diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2021-01-26 15:35:13 +0100 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2021-01-26 15:35:13 +0100 |
| commit | b4478a080673958aa8b35d8de46ba7589c8fcc47 (patch) | |
| tree | c896b8272e0aad398e99ed98231775b7b474dd02 /kernel/workqueue.c | |
| parent | 3bbf9b89592d18c391eafd7a5e0e7429ae2dc767 (diff) | |
| parent | e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62 (diff) | |
Merge tag 'v5.11-rc2' into devel
Linux 5.11-rc2
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index b5295a0b0536..9880b6c0e272 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -3731,17 +3731,24 @@ static void pwq_adjust_max_active(struct pool_workqueue *pwq) * is updated and visible. */ if (!freezable || !workqueue_freezing) { + bool kick = false; + pwq->max_active = wq->saved_max_active; while (!list_empty(&pwq->delayed_works) && - pwq->nr_active < pwq->max_active) + pwq->nr_active < pwq->max_active) { pwq_activate_first_delayed(pwq); + kick = true; + } /* * Need to kick a worker after thawed or an unbound wq's - * max_active is bumped. It's a slow path. Do it always. + * max_active is bumped. In realtime scenarios, always kicking a + * worker will cause interference on the isolated cpu cores, so + * let's kick iff work items were activated. */ - wake_up_worker(pwq->pool); + if (kick) + wake_up_worker(pwq->pool); } else { pwq->max_active = 0; } |
