From patchwork Sat Dec 1 14:39:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 1829521 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0AE033FC64 for ; Sat, 1 Dec 2012 14:39:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752306Ab2LAOjc (ORCPT ); Sat, 1 Dec 2012 09:39:32 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:42949 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752027Ab2LAOjb (ORCPT ); Sat, 1 Dec 2012 09:39:31 -0500 Received: by mail-pb0-f46.google.com with SMTP id wy7so1076536pbc.19 for ; Sat, 01 Dec 2012 06:39:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=YOSTjxlZuZbGhmETblnuAtKrlPjYqfCqGpxTSC/bpW4=; b=ifPyrnlhd8hX6QTg7sw1LpdOtgERW2Sglx9Kwbs1tFkyZlkD2rSypbHuLN1QTyXDUH /I3AgOsqtOolIACuTCfk1vCEwNnik7cW1FgV4Thh8cW31IK5SHMuLLlSU/kVU9iGpBUj vuWa+FPe6TkC0Dndth9JOqB0Dbkv9BVJnlt4ULG2I4xkPOeIqO5UGAA9weiXvlLyyAOo TMez4e581tFpXs825JJj3vFcvx9vSX3BHXUEiOzMOIeFvUdOLePXNaYpaxvU4sdgnDbo e8P3q6LU6VUuB1FTG3evOMhiTDFIrUWbVC8oUaG4PZLYUmPuDLQPolhhEmUaJgA4HSf/ BO9g== Received: by 10.68.248.1 with SMTP id yi1mr14750590pbc.93.1354372771046; Sat, 01 Dec 2012 06:39:31 -0800 (PST) Received: from htj.dyndns.org (c-69-181-251-227.hsd1.ca.comcast.net. [69.181.251.227]) by mx.google.com with ESMTPS id mt15sm4847755pbc.49.2012.12.01.06.39.28 (version=SSLv3 cipher=OTHER); Sat, 01 Dec 2012 06:39:29 -0800 (PST) Date: Sat, 1 Dec 2012 06:39:26 -0800 From: Tejun Heo To: Anders Kaseorg Cc: Herbert Xu , "John W. Linville" , 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 Message-ID: <20121201143926.GB2685@htj.dyndns.org> References: <20121130211435.GJ3873@htj.dyndns.org> <20121130225619.GD6021@htj.dyndns.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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! --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);