Skip to content

workqueue: enhance locking and lookup worker via ID

Lai Jiangshan lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest15 patches 5 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15workqueue: add lock_work_pool()kernel/workqueue.c+93 -770 replies
2/15workqueue: allow more work_pool id spaceinclude/linux/workqueue.h+1 -11 reply
3/15workqueue: remname current worker->id to worker->id_in_poolkernel/workqueue.c kernel/workqueue_internal.h+12 -100 replies
4/15workqueue: add worker's global worker IDkernel/workqueue.c kernel/workqueue_internal.h+29 -00 replies
5/15workqueue: only set pool id when the work is runningkernel/workqueue.c+9 -20 replies
6/15workqueue: use current instead of worker->task in worker_maybe_bind_and_lock()kernel/workqueue.c+3 -41 reply
7/15workqueue: change argument of worker_maybe_bind_and_lock() to poolkernel/workqueue.c+9 -91 reply
8/15workqueue: only change worker->pool with pool lock heldkernel/workqueue.c kernel/workqueue_internal.h+3 -11 reply
9/15workqueue: use worker id in work->data insteadinclude/linux/workqueue.h kernel/workqueue.c+78 -820 replies
10/15workqueue: avoid unneeded calls to get_work_cwq()kernel/workqueue.c+5 -60 replies
11/15workqueue: split work_flags to delayed_flags and color_flags in __queue_work()kernel/workqueue.c+4 -40 replies
12/15workqueue: add extra flags to set_work_worker_and_keep_pending()kernel/workqueue.c+5 -30 replies
13/15workqueue: also record worker in work->data if running&&queuedinclude/linux/workqueue.h kernel/workqueue.c kernel/workqueue_internal.h+101 -814 replies
14/15workqueue: convert busy hash to busy listkernel/workqueue.c kernel/workqueue_internal.h+13 -230 replies
15/15workqueue: queue worker to busy list outside process_one_work()kernel/workqueue.c+4 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH V2 00/15] workqueue: enhance locking and lookup worker via ID

Core patches are patch 1, patch 9, patch 13

Patch 1: enhance locking
Patch 9: recorde worker id to work->data instead of pool id
lookup worker via worker ID if offq
Patch 13:also lookup worker via worker ID if running&&queued,
remove lookup via hashtable

Patch 6-8: ensure modification to worker->pool is under pool lock held Patch 14: remove hashtable totally

other patch is preparing-patch or cleanup.

Lai Jiangshan (15):
workqueue: add lock_work_pool()
workqueue: allow more work_pool id space
workqueue: remname worker->id to worker->id_in_pool
workqueue: add worker's global worker ID
workqueue: only set pool id when the work is running
workqueue: use current instead of worker->task in
worker_maybe_bind_and_lock()
workqueue: change argument of worker_maybe_bind_and_lock() to pool
workqueue: only change worker->pool with pool lock held
workqueue: use worker id instead
workqueue: avoid unneeded calls to get_work_cwq(work)
workqueue: split work_flags to delayed_flags and color_flags in

    __queue_work()

workqueue: add extra flags to set_work_worker_and_keep_pending()
workqueue: also record worker in work->data if running&&queued
workqueue: convert busy hash to busy list
workqueue: queue worker to busy list

 include/linux/workqueue.h   |   25 +-
 kernel/workqueue.c          |  522 ++++++++++++++++++++++++-------------------
 kernel/workqueue_internal.h |   17 +-
 3 files changed, 314 insertions(+), 250 deletions(-)
Signature · 1 line
1.7.7.6