kernel/watchdog.c: add comment to watchdog() exit path
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 23 Mar 2012 22:01:56 +0000 (15:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Mar 2012 23:58:32 +0000 (16:58 -0700)
Revelation from Peter.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@tglx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/watchdog.c

index a01cb03..df30ee0 100644 (file)
@@ -349,6 +349,10 @@ static int watchdog(void *unused)
 
                set_current_state(TASK_INTERRUPTIBLE);
        }
+       /*
+        * Drop the policy/priority elevation during thread exit to avoid a
+        * scheduling latency spike.
+        */
        __set_current_state(TASK_RUNNING);
        sched_setscheduler(current, SCHED_NORMAL, &param);
        return 0;