Skip site navigation (1) Skip section navigation (2)

pgsql: Use mutex hint bit in PPC LWARX instructions, where possible.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use mutex hint bit in PPC LWARX instructions, where possible.
Date: 2012-01-02 05:02:14
Message-ID: E1Rha2I-0007L3-0n@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Use mutex hint bit in PPC LWARX instructions, where possible.

The hint bit makes for a small but measurable performance improvement
in access to contended spinlocks.

On the other hand, some PPC chips give an illegal-instruction failure.
There doesn't seem to be a completely bulletproof way to tell whether the
hint bit will cause an illegal-instruction failure other than by trying
it; but most if not all 64-bit PPC machines should accept it, so follow
the Linux kernel's lead and assume it's okay to use it in 64-bit builds.
Of course we must also check whether the assembler accepts the command,
since even with a recent CPU the toolchain could be old.

Patch by Manabu Ori, significantly modified by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5cfa8dd3007d7e953c6a03b0fa2215d97c581b0c

Modified Files
--------------
configure                      |   62 +++++++++++++++++++++++++++++++++++++++-
configure.in                   |   18 +++++++++++-
src/include/pg_config.h.in     |    5 ++-
src/include/pg_config_manual.h |   18 +++++++++++
src/include/storage/s_lock.h   |    4 ++
5 files changed, 104 insertions(+), 3 deletions(-)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2012-01-02 13:49:14
Subject: pgsql: Add comment about skipping binary files for copyright changes.
Previous:From: Bruce MomjianDate: 2012-01-02 03:27:46
Subject: pgsql: Update copyright git skip comment.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group