]> Git Repo - linux.git/commitdiff
[PATCH] Small schedule() optimization
authorAndreas Mohr <[email protected]>
Mon, 27 Mar 2006 09:15:20 +0000 (01:15 -0800)
committerLinus Torvalds <[email protected]>
Mon, 27 Mar 2006 16:44:43 +0000 (08:44 -0800)
small schedule() microoptimization.

Signed-off-by: Andreas Mohr <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/sched.c

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