netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Anders Kaseorg <andersk@MIT.EDU>
Cc: Herbert Xu <herbert@gondor.hengli.com.au>,
	"John W. Linville" <linville@tuxdriver.com>,
	netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: Wireless regression in workqueue: use mod_delayed_work() instead of __cancel + queue
Date: Sat, 1 Dec 2012 06:39:26 -0800	[thread overview]
Message-ID: <20121201143926.GB2685@htj.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1211302234410.25064@dr-wily.mit.edu>

Hey, Anders.

On Fri, Nov 30, 2012 at 11:15:50PM -0500, Anders Kaseorg wrote:
> Yes.  I tested that both directly on top of the bad commit, and on 
> v3.7-rc7, and it fixes the bug in both cases.

Can you please test this one too?  Thanks!

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 042d221..94964d1 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1364,6 +1364,11 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
 	BUG_ON(timer_pending(timer));
 	BUG_ON(!list_empty(&work->entry));
 
+	if (!delay) {
+		__queue_work(cpu, wq, &dwork->work);
+		return;
+	}
+
 	timer_stats_timer_set_start_info(&dwork->timer);
 
 	/*
@@ -1417,9 +1422,6 @@ bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
 	bool ret = false;
 	unsigned long flags;
 
-	if (!delay)
-		return queue_work_on(cpu, wq, &dwork->work);
-
 	/* read the comment in __queue_work() */
 	local_irq_save(flags);
 

  reply	other threads:[~2012-12-01 14:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28 15:13 Wireless regression in workqueue: use mod_delayed_work() instead of __cancel + queue Anders Kaseorg
2012-11-28 15:17 ` Anders Kaseorg
2012-11-30 21:14   ` Tejun Heo
2012-11-30 22:56     ` Tejun Heo
2012-12-01  4:15       ` Anders Kaseorg
2012-12-01 14:39         ` Tejun Heo [this message]
2012-12-01 23:53           ` Anders Kaseorg
2012-12-02  1:11             ` [PATCH] workqueue: mod_delayed_work_on() shouldn't queue timer on 0 delay Tejun Heo

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=20121201143926.GB2685@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=andersk@MIT.EDU \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.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;
as well as URLs for NNTP newsgroup(s).