Re: [PATCH v2] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining

2021-03-18 Thread Daniel Jordan
Alexey Klimov writes: > The first section of comment seems problematic to me with regards to such > move: > > * As this needs to hold the cpu maps lock it's impossible > * to call device_offline() because that ends up calling > * cpu_down()

Re: [PATCH v2] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining

2021-03-15 Thread Alexey Klimov
On Fri, Feb 12, 2021 at 7:42 PM Daniel Jordan wrote: > > Alexey Klimov writes: > > int cpu_device_up(struct device *dev) > > Yeah, definitely better to do the wait here. > > > int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) > > { > > - int cpu, ret = 0; > > + struct device *dev;

Re: [PATCH v2] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining

2021-02-16 Thread Qais Yousef
On 02/12/21 00:30, Alexey Klimov wrote: > When a CPU offlined and onlined via device_offline() and device_online() > the userspace gets uevent notification. If, after receiving "online" uevent, > userspace executes sched_setaffinity() on some task trying to move it > to a recently onlined CPU,

Re: [PATCH v2] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining

2021-02-12 Thread Daniel Jordan
Alexey Klimov writes: > int cpu_device_up(struct device *dev) Yeah, definitely better to do the wait here. > int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) > { > - int cpu, ret = 0; > + struct device *dev; > + cpumask_var_t mask; > + int cpu, ret; > + > + if

[PATCH v2] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining

2021-02-11 Thread Alexey Klimov
When a CPU offlined and onlined via device_offline() and device_online() the userspace gets uevent notification. If, after receiving "online" uevent, userspace executes sched_setaffinity() on some task trying to move it to a recently onlined CPU, then it often fails with -EINVAL. Userspace needs