Commit 5c732745 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

[PATCH] sched: use cached current value

schedule() can use prev instead of get_current().
Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2cf52d5c
...@@ -2551,7 +2551,7 @@ asmlinkage void __sched schedule(void) ...@@ -2551,7 +2551,7 @@ asmlinkage void __sched schedule(void)
* The idle thread is not allowed to schedule! * The idle thread is not allowed to schedule!
* Remove this check after it has been exercised a bit. * Remove this check after it has been exercised a bit.
*/ */
if (unlikely(current == rq->idle) && current->state != TASK_RUNNING) { if (unlikely(prev == rq->idle) && prev->state != TASK_RUNNING) {
printk(KERN_ERR "bad: scheduling from the idle thread!\n"); printk(KERN_ERR "bad: scheduling from the idle thread!\n");
dump_stack(); dump_stack();
} }
...@@ -2571,8 +2571,8 @@ asmlinkage void __sched schedule(void) ...@@ -2571,8 +2571,8 @@ asmlinkage void __sched schedule(void)
spin_lock_irq(&rq->lock); spin_lock_irq(&rq->lock);
if (unlikely(current->flags & PF_DEAD)) if (unlikely(prev->flags & PF_DEAD))
current->state = EXIT_DEAD; prev->state = EXIT_DEAD;
/* /*
* if entering off of a kernel preemption go straight * if entering off of a kernel preemption go straight
* to picking the next task. * to picking the next task.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment