diff options
author | Andreas Mohr <andi@lisas.de> | 2006-03-27 04:15:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:43 -0500 |
commit | 77e4bfbcf071f795b54862455dce8902b3fc29c2 (patch) | |
tree | cde3cb39a72de0bb8b42c1c5752f25b3b16bf5ee /kernel/sched.c | |
parent | 013d3868143387be99bb0373d49452eaa3c55d41 (diff) |
[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>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index dc599c85a88d..a96a05d23262 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -2879,13 +2879,11 @@ asmlinkage void __sched schedule(void) | |||
2879 | * schedule() atomically, we ignore that path for now. | 2879 | * schedule() atomically, we ignore that path for now. |
2880 | * Otherwise, whine if we are scheduling when we should not be. | 2880 | * Otherwise, whine if we are scheduling when we should not be. |
2881 | */ | 2881 | */ |
2882 | if (likely(!current->exit_state)) { | 2882 | if (unlikely(in_atomic() && !current->exit_state)) { |
2883 | if (unlikely(in_atomic())) { | 2883 | printk(KERN_ERR "BUG: scheduling while atomic: " |
2884 | printk(KERN_ERR "BUG: scheduling while atomic: " | 2884 | "%s/0x%08x/%d\n", |
2885 | "%s/0x%08x/%d\n", | 2885 | current->comm, preempt_count(), current->pid); |
2886 | current->comm, preempt_count(), current->pid); | 2886 | dump_stack(); |
2887 | dump_stack(); | ||
2888 | } | ||
2889 | } | 2887 | } |
2890 | profile_hit(SCHED_PROFILING, __builtin_return_address(0)); | 2888 | profile_hit(SCHED_PROFILING, __builtin_return_address(0)); |
2891 | 2889 | ||