[PATCH 0/2] workqueue: Shrink the lock time

Breno Leitao posted 2 patches 1 week, 6 days ago
There is a newer version of this series
kernel/workqueue.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 49 insertions(+), 8 deletions(-)
[PATCH 0/2] workqueue: Shrink the lock time
Posted by Breno Leitao 1 week, 6 days ago
The goal of this patchset is to decrease the time spent on the
workqueue pool->lock.

Currently, the worker process is woken up inside the lock, which can
be expensive on some architectures.  On arm64, the wake-up issues an
IPI when the target CPU is in idle (wfi on arm64), which requires an
interrupt to wake it. And also, the rq lock, which will be nested in
this case.

This series decreases the time spent under pool->lock by waking up
the process outside of the lock. This improves the microbenchark we have
in lib/ by up to 10%.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
Breno Leitao (2):
      workqueue: split kick_pool() into kick_pool_pick() + wake_up_process()
      workqueue: defer wake_up_process() outside pool->lock on hot paths

 kernel/workqueue.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 49 insertions(+), 8 deletions(-)
---
base-commit: c1ecb239fa3456529a32255359fc78b69eb9d847
change-id: 20260526-fastwake-02982fd66312

Best regards,
--  
Breno Leitao <leitao@debian.org>