kernel/watchdog.c: add comment to watchdog() exit path
authorAndrew Morton <[email protected]>
Fri, 23 Mar 2012 22:01:56 +0000 (15:01 -0700)
committerLinus Torvalds <[email protected]>
Fri, 23 Mar 2012 23:58:32 +0000 (16:58 -0700)
Revelation from Peter.

Cc: Peter Zijlstra <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/watchdog.c

index a01cb03b045a7f872f4a4bda20f15c2a277859f3..df30ee08bdd42161105a9564871cc80491d0b7aa 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;