Re: [RFC PATCH 3/4] kernel/workqueue: Distinguish between general unbound and WQ_SYSFS cpumask changes

From: Waiman Long
Date: Wed Jan 17 2024 - 14:32:46 EST



On 1/17/24 12:12, Tejun Heo wrote:
Hello,

On Wed, Jan 17, 2024 at 02:06:08PM +0100, Juri Lelli wrote:
This looks rather hacky. Can you elaborate how the current code misbehaves
with an example?
I was trying to address the fact that ordered unbound workqueues didn't
seem to reflect unbound_cpumask changes, e.g.

wq_unbound_cpumask=00000003

edac-poller ordered,E 0xffffffff 000000ff kworker/R-edac- 351 0xffffffff 000000ff

vs.

edac-poller ordered,E 00000003 kworker/R-edac- 349 00000003

with the patch applied. But honestly, I'm now also not convinced what
I'm proposing is correct, so I'll need to think more about it.

Can you please confirm though that ordered unbound workqueues are not
"special" for some reason and we would like them to follow
unbound_cpumask changes as normal ubound workqueues?
They aren't special and should follow the normal unbound workqueue cpumask.

My impression is that changing the workqueue cpumask of ordered unbound workqueue may break the ordering guarantee momentarily. I was planning to look into this further to see if that is true when I have time. If it is not a concern, we should certainly apply the global unbound cpumask change to those workqueues as well.

Cheers,
Longman