This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] |
On 06/09/14 13:13, Carlos O'Donell wrote:
Andi -- any change you could file a gcc bug for that? GCC knows how to do a limited form of shrink-wrapping as well as function splitting to optimize these kinds of situations. If it's not working as it should, obviously we'd like to know and try to get it fixed.On 05/06/2014 05:36 PM, Andi Kleen wrote:From: Andi Kleen <ak@linux.intel.com> One difference of the C versions to the assembler wr/rdlock is that the C compiler saves some registers which are unnecessary for the fast path in the prologue of the functions. Split the uncontended fast path out into a separate function. Only when contention is detected is the full featured function called. This makes the fast path code (nearly) identical to the assembler version, and gives uncontended performance within a few cycles.Sounds like the best of both worlds. Thanks for the cleanup.
Thanks, jeff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |