Re: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending too long when CPU un-plugged
From: Peter Zijlstra
Date: Thu Jan 07 2021 - 05:46:59 EST
On Thu, Jan 07, 2021 at 05:18:41PM +0800, Ran Wang wrote:
> +
> + if (IS_ENABLED(CONFIG_PREEMPT_RT) &&
> + !strncmp(p->comm, "ksoftirqd/", 10))
> + schedule_hrtimeout(&to,
> + HRTIMER_MODE_REL | HRTIMER_MODE_HARD);
> + else
> + schedule_hrtimeout(&to, HRTIMER_MODE_REL);
This is horrific, why did you not self-censor and spare me the mental
anguish of having to formulate a CoC compliant response?
It also violates coding style, but given the total lack of any sense,
that seems like a minor detail.
Why can't we use HRTIMER_MODE_HARD unconditionally?