aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-01-14 09:36:26 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-14 12:09:00 -0500
commit41719b03091911028116155deddc5eedf8c45e37 (patch)
tree20a699807d78bc0af86b19443dc751415c0cc6f7 /include/linux/sched.h
parent93d81d1aca26e64a75d06a85f7e128b5f49053e7 (diff)
mutex: preemption fixes
The problem is that dropping the spinlock right before schedule is a voluntary preemption point and can cause a schedule, right after which we schedule again. Fix this inefficiency by keeping preemption disabled until we schedule, do this by explicity disabling preemption and providing a schedule() variant that assumes preemption is already disabled. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4cae9b81a1f8..9f0b372cfa6f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -328,6 +328,7 @@ extern signed long schedule_timeout(signed long timeout);
328extern signed long schedule_timeout_interruptible(signed long timeout); 328extern signed long schedule_timeout_interruptible(signed long timeout);
329extern signed long schedule_timeout_killable(signed long timeout); 329extern signed long schedule_timeout_killable(signed long timeout);
330extern signed long schedule_timeout_uninterruptible(signed long timeout); 330extern signed long schedule_timeout_uninterruptible(signed long timeout);
331asmlinkage void __schedule(void);
331asmlinkage void schedule(void); 332asmlinkage void schedule(void);
332 333
333struct nsproxy; 334struct nsproxy;