From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758274Ab0JHOmt (ORCPT ); Fri, 8 Oct 2010 10:42:49 -0400 Received: from mga01.intel.com ([192.55.52.88]:46469 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757269Ab0JHOmt (ORCPT ); Fri, 8 Oct 2010 10:42:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.57,302,1283756400"; d="scan'208";a="845124402" Date: Fri, 8 Oct 2010 22:42:36 +0800 From: Wu Fengguang To: Yong Wang Cc: Artem Bityutskiy , "Wu, Xia" , Christoph Hellwig , Jens Axboe , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH] bdi: use deferable timer for sync_supers task Message-ID: <20101008144236.GA27331@localhost> References: <20101008083514.GA12402@ywang-moblin2.bj.intel.com> <20101008092520.GB5426@lst.de> <1286532586.2095.55.camel@localhost> <1286533687.2095.58.camel@localhost> <20101008102709.GA12682@ywang-moblin2.bj.intel.com> <20101008135704.GB25439@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101008135704.GB25439@localhost> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 08, 2010 at 09:57:04PM +0800, Wu Fengguang wrote: > On Fri, Oct 08, 2010 at 06:27:09PM +0800, Yong Wang wrote: > > On Fri, Oct 08, 2010 at 01:28:07PM +0300, Artem Bityutskiy wrote: > > > On Fri, 2010-10-08 at 18:27 +0800, Wu, Xia wrote: > > > > > However, when the next wake-up interrupt happens is not defined. It can > > > > > happen 1ms after, or 1 minute after, or 1 hour after. What Christoph > > > > > says is that there should be some guarantee that sb writeout starts, > > > > > say, within 5 to 10 seconds interval. Deferrable timers do not guarantee > > > > > this. But take a look at the range hrtimers - they do exactly this. > > > > > > > > If the system is in sleep state, is there any data which should be written? > > > > > > May be yes, may be no. > > > > > > > Thanks for the quick response, Artem. May I know what might need to be > > written out when system is really idle? > > system idle != no dirty inodes Ah sorry -- I missed the context. Please ignore the following paragraphs for sync_supers.. Thanks, Fengguang > Imagine an application dirties 100MB data and quits. The system then > goes quiet for very long time. In this case we still want the flusher > thread to wake up within 30 seconds to flush the 100MB dirty data. > It's a contract that dirty data will be synced to disk after 30s > (which is the default value of /proc/sys/vm/dirty_expire_centisecs). > > Note that 30s is not an exact value. A dirty page may be synced to > disk when it's been dirtied for 35s. The 5s error comes from the > flusher wakeup interval (/proc/sys/vm/dirty_writeback_centisecs). > > Thanks, > Fengguang