https://github.com/torvalds/linux
Revision c3921ab71507b108d51a0f1ee960f80cd668a93d authored by Linus Torvalds on 11 May 2008, 23:04:48 UTC, committed by Linus Torvalds on 11 May 2008, 23:04:48 UTC
It acts exactly like a regular 'cond_resched()', but will not get
optimized away when CONFIG_PREEMPT is set.

Normal kernel code is already preemptable in the presense of
CONFIG_PREEMPT, so cond_resched() is optimized away (see commit
02b67cc3ba36bdba351d6c3a00593f4ec550d9d3 "sched: do not do
cond_resched() when CONFIG_PREEMPT").

But when wanting to conditionally reschedule while holding a lock, you
need to use "cond_sched_lock(lock)", and the new function is the BKL
equivalent of that.

Also make fs/locks.c use it.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 9662369
History
Tip revision: c3921ab71507b108d51a0f1ee960f80cd668a93d authored by Linus Torvalds on 11 May 2008, 23:04:48 UTC
Add new 'cond_resched_bkl()' helper function
Tip revision: c3921ab
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 682 bytes
.mailmap -rw-r--r-- 3.6 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 90.5 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 97.0 KB
Makefile -rw-r--r-- 53.7 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top