[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: [HACKERS] LWLock optimization for multicore Power machines
From: Tom Lane <tgl () sss ! pgh ! pa ! us>
Date: 2017-03-31 22:36:04
Message-ID: 10419.1490999764 () sss ! pgh ! pa ! us
[Download RAW message or body]
Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
>> It seems that on this platform definition of atomics should be provided by
>> fallback.h. But it doesn't because I already defined PG_HAVE_ATOMIC_U32_SUPPORT
>> in arch-ppc.h. I think in this case we shouldn't provide ppc-specific
>> implementation of pg_atomic_fetch_mask_add_u32(). However, I don't know
>> how to do this assuming arch-ppc.h is included before compiler-specific
>> headers. Thus, in arch-ppc.h we don't know yet if we would find
>> implementation of atomics for this platform. One possible solution is to
>> provide assembly implementation for all atomics in arch-ppc.h.
> BTW, implementation for all atomics in arch-ppc.h would be too invasive and
> shouldn't be considered for v10.
> However, I made following workaround: declare pg_atomic_uint32 and
> pg_atomic_fetch_mask_add_u32_impl() only when we know that generic-gcc.h
> would declare gcc-based atomics.
I don't have a well-informed opinion on whether this is a reasonable thing
to do, but I imagine Andres does.
> Could you, please, check it on Apple PPC?
It does compile and pass "make check" on prairiedog.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic