* [PATCH] watchdog: Drop FIFO policy in exit path
@ 2011-09-12 11:40 Thomas Gleixner
0 siblings, 0 replies; only message in thread
From: Thomas Gleixner @ 2011-09-12 11:40 UTC (permalink / raw)
To: LKML; +Cc: Peter Zijlstra
When the watchdog thread exits it runs through the exit path with FIFO
priority. There is no point in doing so. Switch back to SCHED_NORMAL
before exiting.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/watchdog.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-2.6/kernel/watchdog.c
===================================================================
--- linux-2.6.orig/kernel/watchdog.c
+++ linux-2.6/kernel/watchdog.c
@@ -320,7 +320,7 @@ static enum hrtimer_restart watchdog_tim
*/
static int watchdog(void *unused)
{
- static struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };
+ struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };
struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer);
sched_setscheduler(current, SCHED_FIFO, ¶m);
@@ -349,7 +349,8 @@ static int watchdog(void *unused)
set_current_state(TASK_INTERRUPTIBLE);
}
__set_current_state(TASK_RUNNING);
-
+ param.sched_priority = 0;
+ sched_setscheduler(current, SCHED_NORMAL, ¶m);
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-09-12 11:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-12 11:40 [PATCH] watchdog: Drop FIFO policy in exit path Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®