Re: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending too long when CPU un-plugged

2021-01-08 Thread Sebastian Siewior
On 2021-01-08 10:32:36 [+0100], Peter Zijlstra wrote: > It's a single task wakeup (the caller), doing that from hardirq context > really should not be a problem, we do lots of that in RT already. I'm not worry about that single wakeup but about an artificial case where you manage to accumulate mul

Re: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending too long when CPU un-plugged

2021-01-08 Thread Peter Zijlstra
On Thu, Jan 07, 2021 at 04:28:43PM +0100, Sebastian Siewior wrote: > 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. It's a single task wakeup (the caller), doing that

RE: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending too long when CPU un-plugged

2021-01-08 Thread Ran Wang
Hi Sebastian, On Friday, January 8, 2021 5:05 PM, Sebastian Siewior wrote: > > On 2021-01-08 08:45:14 [+], Ran Wang wrote: > > Hi Sebastian, Peter > Hi, > > > > 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-

Re: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending too long when CPU un-plugged

2021-01-08 Thread Sebastian Siewior
On 2021-01-08 08:45:14 [+], Ran Wang wrote: > Hi Sebastian, Peter Hi, > > 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 > >26c72

RE: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending too long when CPU un-plugged

2021-01-08 Thread Ran Wang
Hi Sebastian, Peter Thursday, January 7, 2021 11:29 PM, Sebastian Siewior wrote: > > 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) && > > > +

Re: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending too long when CPU un-plugged

2021-01-07 Thread Sebastian Siewior
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(&t

Re: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending too long when CPU un-plugged

2021-01-07 Thread Peter Zijlstra
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_RE

RE: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending too long when CPU un-plugged

2021-01-07 Thread Ran Wang
Hi, On Thursday, January 7, 2021 5:19 PM, Ran Wang wrote: > > When doing CPU un-plug stress test, function smpboot_park_threads() would get > call to park kernel threads (which including ksoftirqd) on > that CPU core, and function wait_task_inactive() would yield for those queued > task(s) by ca