diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-02-18 07:39:37 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:44:57 -0400 |
commit | 79b3feffb10417f197d2ab48dd4fa3c0c9e7d788 (patch) | |
tree | 78b754d36beddd15f43723faa861e06b239ca47b /kernel/sched_fair.c | |
parent | 19fb518c2a0c5d88ed22bba7083b7e7bc2a9c231 (diff) |
sched: fix regression with sched yield
Balbir Singh reported:
> 1:mon> t
> [c0000000e7677da0] c000000000067de0 .sys_sched_yield+0x6c/0xbc
> [c0000000e7677e30] c000000000008748 syscall_exit+0x0/0x40
> --- Exception: c01 (System Call) at 00000400001d09e4
> SP (4000664cb10) is in userspace
> 1:mon> r
> cpu 0x1: Vector: 300 (Data Access) at [c0000000e7677aa0]
> pc: c000000000068e50: .yield_task_fair+0x94/0xc4
> lr: c000000000067de0: .sys_sched_yield+0x6c/0xbc
the check that should have avoided that is:
/*
* Are we the only task in the tree?
*/
if (unlikely(rq->load.weight == curr->se.load.weight))
return;
But I guess that overlooks rt tasks, they also increase the load.
So I guess something like this ought to fix it..
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index bedda18f37a5..290cf770b712 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -904,7 +904,7 @@ static void yield_task_fair(struct rq *rq) | |||
904 | /* | 904 | /* |
905 | * Already in the rightmost position? | 905 | * Already in the rightmost position? |
906 | */ | 906 | */ |
907 | if (unlikely(rightmost->vruntime < se->vruntime)) | 907 | if (unlikely(!rightmost || rightmost->vruntime < se->vruntime)) |
908 | return; | 908 | return; |
909 | 909 | ||
910 | /* | 910 | /* |