diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2021-02-07 15:45:02 +0200 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2021-02-07 15:45:02 +0200 |
commit | 32ed4c6cace37c492b7deacdf3fa223618b1ad2e (patch) | |
tree | 0d247f7c30832c3137d9a868f95df59b19bf7712 /kernel/workqueue.c | |
parent | 4d2544c30eab39bfe0eed6027fe4059f58ee91ad (diff) | |
parent | 0566f6529a7b8d15d8ff50797331717b346f9aa4 (diff) |
Merge branch 'android-4.4-p' of https://android.googlesource.com/kernel/common into lineage-18.1-caf-msm8998
This brings LA.UM.9.2.r1-02000-SDMxx0.0 up to date with
https://android.googlesource.com/kernel/common/ android-4.4-p at commit:
0566f6529a7b8 Merge 4.4.255 into android-4.4-p
Conflicts:
drivers/scsi/ufs/ufshcd.c
drivers/usb/gadget/function/f_accessory.c
drivers/usb/gadget/function/f_uac2.c
net/core/skbuff.c
Change-Id: I327c7f3793e872609f33f2a8e70eba7b580d70f3
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 696f0913ba38..49765c744ba1 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -3395,17 +3395,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; } |