dect
/
linux-2.6
Archived
13
0
Fork 0

[PATCH] Small schedule() optimization

small schedule() microoptimization.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Andreas Mohr 2006-03-27 01:15:20 -08:00 committed by Linus Torvalds
parent 013d386814
commit 77e4bfbcf0
1 changed files with 5 additions and 7 deletions

View File

@ -2879,13 +2879,11 @@ asmlinkage void __sched schedule(void)
* schedule() atomically, we ignore that path for now. * schedule() atomically, we ignore that path for now.
* Otherwise, whine if we are scheduling when we should not be. * Otherwise, whine if we are scheduling when we should not be.
*/ */
if (likely(!current->exit_state)) { if (unlikely(in_atomic() && !current->exit_state)) {
if (unlikely(in_atomic())) { printk(KERN_ERR "BUG: scheduling while atomic: "
printk(KERN_ERR "BUG: scheduling while atomic: " "%s/0x%08x/%d\n",
"%s/0x%08x/%d\n", current->comm, preempt_count(), current->pid);
current->comm, preempt_count(), current->pid); dump_stack();
dump_stack();
}
} }
profile_hit(SCHED_PROFILING, __builtin_return_address(0)); profile_hit(SCHED_PROFILING, __builtin_return_address(0));