[PATCH] benchtests: Add pthread_once common-case test.
Torvald Riegel
triegel@redhat.com
Tue Oct 8 21:09:00 GMT 2013
This adds a benchtest for the common-case scenario for pthread_once.
We have a single thread that runs a no-op initialization once and then
repeatedly runs checks of the initialization (i.e., an acquire load and
conditional jump) in a tight loop. This gives us, on average, the
best-case latency of pthread_once (the initialization is the
exactly-once slow path, and we're not looking at initialization-related
synchronization overheads in this case). I'm adding this to investigate
whether we still need the x86-custom pthread_once version written in
assembler, or whether we can use the generic version without a
performance loss (both use the same algorithm).
This needs the other patch that adds the include-sources directive to
scripts/bench.pl.
OK?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread_once_bench.patch
Type: text/x-patch
Size: 4043 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20131008/d51eea82/attachment.bin>
More information about the Libc-alpha
mailing list