pgsql: Fix spinlock implementation for some !solaris sparc platforms.

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Fix spinlock implementation for some !solaris sparc platforms.
Дата
Msg-id E1XRTLd-00082J-2w@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix spinlock implementation for some !solaris sparc platforms.

Some Sparc CPUs can be run in various coherence models, ranging from
RMO (relaxed) over PSO (partial) to TSO (total). Solaris has always
run CPUs in TSO mode while in userland, but linux didn't use to and
the various *BSDs still don't. Unfortunately the sparc TAS/S_UNLOCK
were only correct under TSO. Fix that by adding the necessary memory
barrier instructions. On sparcv8+, which should be all relevant CPUs,
these are treated as NOPs if the current consistency model doesn't
require the barriers.

Discussion: 20140630222854.GW26930@awork2.anarazel.de

Will be backpatched to all released branches once a few buildfarm
cycles haven't shown up problems. As I've no access to sparc, this is
blindly written.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/27ef6b65308c28836b08a5f5b16e03d37a905ad9

Modified Files
--------------
src/backend/port/tas/sunstudio_sparc.s |    2 ++
src/include/storage/s_lock.h           |   49 +++++++++++++++++++++++++++++++-
2 files changed, 50 insertions(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Fix typo in solaris spinlock fix.
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Fix typo in solaris spinlock fix.