Messages in this thread | | | Date | Sat, 16 Jan 2021 16:19:39 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH 8/8] sched: Relax the set_cpus_allowed_ptr() semantics |
| |
On Sat, Jan 16, 2021 at 10:39:03PM +0800, Lai Jiangshan wrote: > On Sat, Jan 16, 2021 at 7:43 PM Peter Zijlstra <peterz@infradead.org> wrote: > > > > Now that we have KTHREAD_IS_PER_CPU to denote the critical per-cpu > > tasks to retain during CPU offline, we can relax the warning in > > set_cpus_allowed_ptr(). Any spurious kthread that wants to get on at > > the last minute will get pushed off before it can run. > > > > While during CPU online there is no harm, and actual benefit, to > > allowing kthreads back on early, it simplifies hotplug code. > > > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> > > Thanks! > > Relaxing set_cpus_allowed_ptr() was also one of the choices I listed, > which can really simplify hotplug code in the workqueue and may be > other hotplug code.
Indeed you did. Having that KTHREAD_IS_PER_CPU for the offline side of things made it possible to relax (as per the Changelog above).
> Reviewed-by: Lai jiangshan <jiangshanlai@gmail.com>
Thanks!
| |