Re: [RFC][PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu online

2021-01-20 Thread Daniel Jordan
Alexey Klimov writes: > Daniel, thank you for taking a look. I don't mind reviewing+testing > another approach that you described. Eh, I like yours better :) >> Absent further discussion, Alexey, do you plan to post another version? > > I plan to update this patch and re-send in the next couple

Re: [RFC][PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu online

2021-01-19 Thread Alexey Klimov
On Fri, Jan 15, 2021 at 6:54 AM Daniel Jordan wrote: > > Daniel Jordan writes: > > Peter Zijlstra writes: > >>> The nature of this bug is also described here (with different > >>> consequences): > >>> https://lore.kernel.org/lkml/20200211141554.24181-1-qais.you...@arm.com/ > >> > >> Yeah, pesky

Re: [RFC][PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu online

2021-01-14 Thread Daniel Jordan
Daniel Jordan writes: > Peter Zijlstra writes: >>> The nature of this bug is also described here (with different consequences): >>> https://lore.kernel.org/lkml/20200211141554.24181-1-qais.you...@arm.com/ >> >> Yeah, pesky deadlocks.. someone was going to try again. > > I dug up the synchronous p

Re: [RFC][PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu online

2020-12-08 Thread Daniel Jordan
Peter Zijlstra writes: >> The nature of this bug is also described here (with different consequences): >> https://lore.kernel.org/lkml/20200211141554.24181-1-qais.you...@arm.com/ > > Yeah, pesky deadlocks.. someone was going to try again. I dug up the synchronous patch https://lore.kernel.o

Re: [RFC][PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu online

2020-12-08 Thread Daniel Jordan
Alexey Klimov writes: > I also in doubts if we need cpuset_wait_for_hotplug() in > cpuhp_online_cpu_device() > since an online uevent is sent there too. We do need it there if we go with this fix. Your reproducer hits the same issue when it's changed to exercise smt/control instead of cpuN/onli

Re: [RFC][PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu online

2020-12-07 Thread Peter Zijlstra
On Thu, Dec 03, 2020 at 05:14:31PM +, Alexey Klimov wrote: > When a CPU offlined and onlined via device_offline() and device_online() > the userspace gets uevent notification. If, after receiving uevent, > userspace executes sched_setaffinity() on some task trying to move it > to a recently onl

[RFC][PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu online

2020-12-03 Thread Alexey Klimov
When a CPU offlined and onlined via device_offline() and device_online() the userspace gets uevent notification. If, after receiving uevent, userspace executes sched_setaffinity() on some task trying to move it to a recently onlined CPU, then it will fail with -EINVAL. Userspace needs to wait aroun