mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Tejun Heo <tj@kernel.org>, linux-kernel@vger.kernel.org
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Subject: [PATCH 3/3 V2] workqueue: no pending test for busy_worker.rebind_work
Date: Tue, 28 Aug 2012 19:34:39 +0800	[thread overview]
Message-ID: <1346153686-3380-3-git-send-email-laijs@cn.fujitsu.com> (raw)
In-Reply-To: <1346153686-3380-1-git-send-email-laijs@cn.fujitsu.com>

rebind_workers() can't return until all workers notify itself,
it means when rebind_workers() returns, all queued busy_worker.rebind_work
have launched, the pending bit is cleared.

When the new rebind_workers() comes, it dozn't need to test the already known
cleared pending bit.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
 kernel/workqueue.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 3e0bd20..eec11c3 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1420,10 +1420,6 @@ static void rebind_workers(struct global_cwq *gcwq)
 	for_each_busy_worker(worker, i, pos, gcwq) {
 		struct work_struct *rebind_work = &worker->rebind_work;
 
-		if (test_and_set_bit(WORK_STRUCT_PENDING_BIT,
-				     work_data_bits(rebind_work)))
-			continue;
-
 		all_cnt++;
 		worker->worker_rebind = &worker_rebind;
 
-- 
1.7.4.4


  parent reply	other threads:[~2012-08-28 11:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 11:34 [PATCH 1/3 V2] workqueue: reimplement rebind_workers() Lai Jiangshan
2012-08-28 11:34 ` [PATCH 2/3 V2] workqueue: ensure the wq_worker_sleeping() see the right flags Lai Jiangshan
2012-08-28 11:34 ` Lai Jiangshan [this message]
2012-08-28 20:17 ` [PATCH 1/3 V2] workqueue: reimplement rebind_workers() Tejun Heo
2012-08-29  2:02   ` Lai Jiangshan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346153686-3380-3-git-send-email-laijs@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome