Commit 94beddac authored by Peter Zijlstra's avatar Peter Zijlstra

sched,watchdog: Convert to sched_set_fifo()

Because SCHED_FIFO is a broken scheduler model (see previous patches)
take away the priority field, the kernel can't possibly make an
informed decision.

Effectively changes prio from 99 to 50.

Cc: wim@linux-watchdog.org
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarIngo Molnar <mingo@kernel.org>
parent 28d2f209
...@@ -1144,14 +1144,13 @@ void watchdog_dev_unregister(struct watchdog_device *wdd) ...@@ -1144,14 +1144,13 @@ void watchdog_dev_unregister(struct watchdog_device *wdd)
int __init watchdog_dev_init(void) int __init watchdog_dev_init(void)
{ {
int err; int err;
struct sched_param param = {.sched_priority = MAX_RT_PRIO - 1,};
watchdog_kworker = kthread_create_worker(0, "watchdogd"); watchdog_kworker = kthread_create_worker(0, "watchdogd");
if (IS_ERR(watchdog_kworker)) { if (IS_ERR(watchdog_kworker)) {
pr_err("Failed to create watchdog kworker\n"); pr_err("Failed to create watchdog kworker\n");
return PTR_ERR(watchdog_kworker); return PTR_ERR(watchdog_kworker);
} }
sched_setscheduler(watchdog_kworker->task, SCHED_FIFO, &param); sched_set_fifo(watchdog_kworker->task);
err = class_register(&watchdog_class); err = class_register(&watchdog_class);
if (err < 0) { if (err < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment