LWN.net Logo

workqueue: enhance locking and lookup worker via ID

From:  Lai Jiangshan <laijs@cn.fujitsu.com>
To:  Tejun Heo <tj@kernel.org>, linux-kernel@vger.kernel.org
Subject:  [PATCH V2 00/15] workqueue: enhance locking and lookup worker via ID
Date:  Tue, 19 Feb 2013 00:12:01 +0800
Message-ID:  <1361203940-6300-1-git-send-email-laijs@cn.fujitsu.com>
Cc:  Lai Jiangshan <laijs@cn.fujitsu.com>
Archive-link:  Article, Thread

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(-)

-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds