diff options
| author | Ingo Molnar <mingo@kernel.org> | 2020-03-19 15:01:45 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2020-03-19 15:01:45 +0100 |
| commit | 409e1a31404082ecb85b54bba920a3dd8077c672 (patch) | |
| tree | 50daa709a2e9c461316122eb7b7850de9eb30f03 /kernel/workqueue.c | |
| parent | fdca7c1496cf05657654b6576143e909fc160a61 (diff) | |
| parent | db5d85ce82487331b06ec0e076b85b5a3968bf53 (diff) | |
| download | cachepc-linux-409e1a31404082ecb85b54bba920a3dd8077c672.tar.gz cachepc-linux-409e1a31404082ecb85b54bba920a3dd8077c672.zip | |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 301db4406bc3..4e01c448b4b4 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1411,14 +1411,16 @@ static void __queue_work(int cpu, struct workqueue_struct *wq, return; rcu_read_lock(); retry: - if (req_cpu == WORK_CPU_UNBOUND) - cpu = wq_select_unbound_cpu(raw_smp_processor_id()); - /* pwq which will be used unless @work is executing elsewhere */ - if (!(wq->flags & WQ_UNBOUND)) - pwq = per_cpu_ptr(wq->cpu_pwqs, cpu); - else + if (wq->flags & WQ_UNBOUND) { + if (req_cpu == WORK_CPU_UNBOUND) + cpu = wq_select_unbound_cpu(raw_smp_processor_id()); pwq = unbound_pwq_by_node(wq, cpu_to_node(cpu)); + } else { + if (req_cpu == WORK_CPU_UNBOUND) + cpu = raw_smp_processor_id(); + pwq = per_cpu_ptr(wq->cpu_pwqs, cpu); + } /* * If @work was previously on a different pool, it might still be |
