diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-12 22:34:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-12 22:34:13 +0200 |
commit | c714a534d85576af21b06be605ca55cb2fb887ee (patch) | |
tree | 2d0501e6426b9e069082fd6f09da02c2334832e0 /include | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 (diff) | |
download | linux-c714a534d85576af21b06be605ca55cb2fb887ee.tar.xz linux-c714a534d85576af21b06be605ca55cb2fb887ee.zip |
Make 'cond_resched()' nullification depend on PREEMPT_BKL
Because it's not correct with a non-preemptable BKL and just causes
PREEMPT kernels to have longer latencies than non-PREEMPT ones (which is
obviously not the point of it at all).
Of course, that config option actually got removed as an option earlier,
so for now this basically disables it entirely, but if BKL preemption is
ever resurrected it will be a meaningful optimization. And in the
meantime, it at least documents the intent of the code, while not doing
the wrong thing.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5a63f2d72af6..5395a6176f4b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2038,7 +2038,7 @@ static inline int need_resched(void) * cond_resched_softirq() will enable bhs before scheduling. */ extern int _cond_resched(void); -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_BKL static inline int cond_resched(void) { return 0; |