On 11/12/20 12:51, Valentin Schneider wrote: >> In that case maybe we should check for the cpu_active_mask here too ? > > Looking at it again, I think we might need to. > > IIUC you can end up with pools bound to a single NUMA node (?). In that > case, say the last CPU of a node is going down, then: > > workqueue_offline_cpu() > wq_update_unbound_numa() > alloc_unbound_pwq() > get_unbound_pool() > > would still pick that node, because it doesn't look at the online / active > mask. And at this point, we would affine the > kworkers to that node, and we're back to having kworkers enqueued on a > (!active, online) CPU that is going down...
Assuming a node covers at least 2 CPUs, that can't actually happen per is_cpu_allowed().