Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754537Ab3ITXDD (ORCPT ); Fri, 20 Sep 2013 19:03:03 -0400 Received: from mail-qa0-f41.google.com ([209.85.216.41]:64628 "EHLO mail-qa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753045Ab3ITXDB (ORCPT ); Fri, 20 Sep 2013 19:03:01 -0400 Date: Fri, 20 Sep 2013 18:02:56 -0500 From: Tejun Heo To: Maxim Patlasov Cc: linux-mm@kvack.org, akpm@linux-foundation.org, fengguang.wu@intel.com, jack@suse.cz, linux-kernel@vger.kernel.org Subject: Re: [PATCH] writeback: fix delayed sync(2) Message-ID: <20130920230256.GB8763@mtj.dyndns.org> References: <20130920125029.17356.66782.stgit@dhcp-10-30-17-2.sw.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130920125029.17356.66782.stgit@dhcp-10-30-17-2.sw.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 915 Lines: 25 Hello, On Fri, Sep 20, 2013 at 04:52:26PM +0400, Maxim Patlasov wrote: > @@ -294,7 +294,7 @@ void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi) > unsigned long timeout; > > timeout = msecs_to_jiffies(dirty_writeback_interval * 10); > - mod_delayed_work(bdi_wq, &bdi->wb.dwork, timeout); > + queue_delayed_work(bdi_wq, &bdi->wb.dwork, timeout); Hmmm... this at least requires comment explaining why mod_delayed_work() doesn't work here. Also, I wonder whether what we need is a function which either queues if !pending and shortens timer if pending. This is a relatively common pattern and the suggested fix is subtle and fragile. Thanks. -- tejun -- 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/