This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Using __kuser_cmpxchg


Nicolas Pitre writes:
 > On Mon, 19 Nov 2007, Boehm, Hans wrote:
 > 
 > > FWIW:  The C++ atomics library that was recently voted into the C++
 > > working paper
 > > (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html )
 > > allows "spurious" "compare_swap" failures, and returns both the read
 > > value, and
 > > whether or not the CAS succeeded.  It would be nice if the kernel
 > > interface
 > > allowed that to be implemented as efficiently as possible.
 > 
 > Well, given that the version without spurious failure is 5
 > instructions instead of 7 for the non-ARMv6 version, and 7 instead
 > of 5 for the ARMv6+ version, I don't think that going with the
 > version without spurious errors all the time will make much of a
 > difference in performance.  In fact the non ARMv6 version which is
 > actually the important one (since optimized ARMv6 binaries may
 > implement it inline anyway) is now _more_ efficient than before.

Indeed, and it will be really easy to synthesize one from the other.
I think we've got the right solution.

Andrew.

-- 
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]