diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-03-13 12:21:26 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-20 20:49:53 +0200 |
commit | ff743345bf7685a207868048a70e23164c4785e5 (patch) | |
tree | 7cdb917ad5ac3aa7798b0358a246ddc46a363cdc /kernel/mutex.c | |
parent | 13318a7186d8e0ae08c996ea4111a945e7789772 (diff) | |
download | linux-ff743345bf7685a207868048a70e23164c4785e5.tar.bz2 |
sched: remove extra call overhead for schedule()
Lai Jiangshan's patch reminded me that I promised Nick to remove
that extra call overhead in schedule().
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090313112300.927414207@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/mutex.c')
-rw-r--r-- | kernel/mutex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/mutex.c b/kernel/mutex.c index 5d79781394a3..e1fb73510409 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c @@ -248,7 +248,9 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, /* didnt get the lock, go to sleep: */ spin_unlock_mutex(&lock->wait_lock, flags); - __schedule(); + preempt_enable_no_resched(); + schedule(); + preempt_disable(); spin_lock_mutex(&lock->wait_lock, flags); } |