https://github.com/torvalds/linux
Revision 3dd2ee4824b668a635d6d2bb6bc73f33708cab9f authored by Linus Torvalds on 26 April 2011, 01:10:58 UTC, committed by Linus Torvalds on 26 April 2011, 01:10:58 UTC
When we are waiting for the bit-lock to be released, and are looping
over the 'cpu_relax()' should not be doing anything else - otherwise we
miss the point of trying to do the whole 'cpu_relax()'.

Do the preemption enable/disable around the loop, rather than inside of
it.

Noticed when I was looking at the code generation for the dcache
__d_drop usage, and the code just looked very odd.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 5dd12af
History
Tip revision: 3dd2ee4824b668a635d6d2bb6bc73f33708cab9f authored by Linus Torvalds on 26 April 2011, 01:10:58 UTC
bit_spinlock: don't play preemption games inside the busy loop
Tip revision: 3dd2ee4
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 941 bytes
.mailmap -rw-r--r-- 4.1 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.7 KB
Kbuild -rw-r--r-- 2.4 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 188.3 KB
Makefile -rw-r--r-- 51.1 KB
README -rw-r--r-- 17.1 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top