]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: Kick a worker based on the actual activation of delayed works
authorYunfeng Ye <yeyunfeng@huawei.com>
Thu, 19 Nov 2020 06:21:25 +0000 (14:21 +0800)
committerTejun Heo <tj@kernel.org>
Wed, 25 Nov 2020 22:10:28 +0000 (17:10 -0500)
commita24be5ec4de0a4e8d10037eeace95d13d1a0c97e
treeff3811c2c56f56b94ec7687bf943454112591fda
parent8273a23e0eea294a9c91ab0fdf04a82f462b2f92
workqueue: Kick a worker based on the actual activation of delayed works

In realtime scenario, We do not want to have interference on the
isolated cpu cores. but when invoking alloc_workqueue() for percpu wq
on the housekeeping cpu, it kick a kworker on the isolated cpu.

  alloc_workqueue
    pwq_adjust_max_active
      wake_up_worker

The comment in pwq_adjust_max_active() said:
  "Need to kick a worker after thawed or an unbound wq's
   max_active is bumped"

So it is unnecessary to kick a kworker for percpu's wq when invoking
alloc_workqueue(). this patch only kick a worker based on the actual
activation of delayed works.

Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Reviewed-by: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c