mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
workqueue: allocate attrs for all workqueues
The attrs are where the affinity scope lives, and a per-cpu workqueue will need one once per-cpu becomes a scope rather than a separate backend. Allocate them unconditionally. wq_dump.py used a non-NULL wq->attrs as its test for an unbound workqueue, which no longer holds; test WQ_UNBOUND there instead. Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
464e454e1c
commit
f784d9ce8d
|
|
@ -5902,11 +5902,9 @@ static struct workqueue_struct *__alloc_workqueue(const char *fmt,
|
|||
if (!wq)
|
||||
return NULL;
|
||||
|
||||
if (flags & WQ_UNBOUND) {
|
||||
wq->attrs = alloc_workqueue_attrs_noprof();
|
||||
if (!wq->attrs)
|
||||
goto err_free_wq;
|
||||
}
|
||||
wq->attrs = alloc_workqueue_attrs_noprof();
|
||||
if (!wq->attrs)
|
||||
goto err_free_wq;
|
||||
|
||||
name_len = vsnprintf(wq->name, sizeof(wq->name), fmt, args);
|
||||
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ for wq in list_for_each_entry('struct workqueue_struct', workqueues.address_of_(
|
|||
continue
|
||||
|
||||
print(f'{wq.name.string_().decode():{WQ_NAME_LEN}}', end='')
|
||||
if wq.attrs.value_() != 0:
|
||||
if wq.flags & WQ_UNBOUND:
|
||||
print(f' {cpumask_str(wq.attrs.cpumask):{ucpus_len}}', end='')
|
||||
else:
|
||||
print(f' {"":{ucpus_len}}', end='')
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user