[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210107152843.gyljmpctkwybfewh@linutronix.de>
Date: Thu, 7 Jan 2021 16:28:43 +0100
From: Sebastian Siewior <bigeasy@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ran Wang <ran.wang_1@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Jiafei Pan <jiafei.pan@....com>,
linux-rt-users@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending
too long when CPU un-plugged
On 2021-01-07 11:45:39 [+0100], Peter Zijlstra wrote:
> 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?
I had a similar patch in -RT and dropped it in v5.10-rc7-rt16.
It was added because RT couldn't boot since creating the boot-threads
didn't work before the ksoftirqd was up. This was fixed by commit
26c7295be0c5e ("kthread: Do not preempt current task if it is going to call schedule()")
and live was good again.
tglx (also) suggested to add HRTIMER_MODE_HARD unconditionally (it
looked at SYSTEM_STATE back then) and I was only worried some abuse via
userland.
This sleep can be triggered by ptrace/strace() and with brief testing I
can trigger the sleep there but I don't get it anywhere near where I
would notice it with cyclictest.
Sebastian
Powered by blists - more mailing lists