Re: [RFC][PATCH 06/22] sched: SCHED_DEADLINE handles spacialkthreads
From: Peter Zijlstra
Date: Thu Nov 11 2010 - 09:47:14 EST
On Fri, 2010-10-29 at 08:31 +0200, Raistlin wrote:
> diff --git a/kernel/softirq.c b/kernel/softirq.c
> index d4d918a..9c4c967 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -853,13 +853,9 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb,
> cpumask_any(cpu_online_mask));
> case CPU_DEAD:
> case CPU_DEAD_FROZEN: {
> - static struct sched_param param = {
> - .sched_priority = MAX_RT_PRIO-1
> - };
> -
> p = per_cpu(ksoftirqd, hotcpu);
> per_cpu(ksoftirqd, hotcpu) = NULL;
> - sched_setscheduler_nocheck(p, SCHED_FIFO, ¶m);
> + setscheduler_dl_special(p);
> kthread_stop(p);
> takeover_tasklets(hotcpu);
> break;
So this comes from 1c6b4aa94576, which is something I wouldn't have
bothered merging in the first place, if you pin a cpu with RT tasks like
that you get to keep the pieces, hotplug isn't the only thing that will
go wonky.
Anyway, if you leave the code as is you'll be fine, it'll me above any
FIFO task, but still below deadline tasks and the stop task, neither of
which should be hogging the system like that anyway.
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 94ca779..2b7f259 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -307,10 +307,9 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
> */
> static int watchdog(void *unused)
> {
> - static 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);
> + setscheduler_dl_special(current);
>
> /* initialize timestamp */
> __touch_watchdog();
I'd be inclined to drop this too, if people get watchdog timeouts it
means the system is really over-commited on deadline tasks and the
watchdog FIFO thread didn't get around to running, something which I
think we both agree shouldn't be happening.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/