Searched hist:"2 d4d57db" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/arch/x86/include/asm/ |
H A D | spinlock.h | 2d4d57db Sun Jan 25 14:50:13 CST 2009 Frederic Weisbecker <fweisbec@gmail.com> x86: micro-optimize __raw_read_trylock()
The current version of __raw_read_trylock starts with decrementing the lock and read its new value as a separate operation after that.
That makes 3 dereferences (read, write (after sub), read) whereas a single atomic_dec_return does only two pointers dereferences (read, write).
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> 2d4d57db Sun Jan 25 14:50:13 CST 2009 Frederic Weisbecker <fweisbec@gmail.com> x86: micro-optimize __raw_read_trylock() The current version of __raw_read_trylock starts with decrementing the lock and read its new value as a separate operation after that. That makes 3 dereferences (read, write (after sub), read) whereas a single atomic_dec_return does only two pointers dereferences (read, write). Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
|