From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751785Ab0GZMcQ (ORCPT ); Mon, 26 Jul 2010 08:32:16 -0400 Received: from mga11.intel.com ([192.55.52.93]:52291 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715Ab0GZMcP (ORCPT ); Mon, 26 Jul 2010 08:32:15 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.55,261,1278313200"; d="scan'208";a="589718459" Date: Mon, 26 Jul 2010 20:31:41 +0800 From: Wu Fengguang To: Jan Kara Cc: Mel Gorman , Andrew Morton , Dave Chinner , Christoph Hellwig , Chris Mason , Jens Axboe , LKML , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH 4/6] writeback: sync expired inodes first in background writeback Message-ID: <20100726123141.GA13146@localhost> References: <20100722050928.653312535@intel.com> <20100722061822.906037624@intel.com> <20100726105736.GM5300@csn.ul.ie> <20100726120011.GG6284@localhost> <20100726122054.GF3280@quack.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100726122054.GF3280@quack.suse.cz> 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 Mon, Jul 26, 2010 at 08:20:54PM +0800, Jan Kara wrote: > On Mon 26-07-10 20:00:11, Wu Fengguang wrote: > > On Mon, Jul 26, 2010 at 06:57:37PM +0800, Mel Gorman wrote: > > > On Thu, Jul 22, 2010 at 01:09:32PM +0800, Wu Fengguang wrote: > > > > A background flush work may run for ever. So it's reasonable for it to > > > > mimic the kupdate behavior of syncing old/expired inodes first. > > > > > > > > The policy is > > > > - enqueue all newly expired inodes at each queue_io() time > > > > - retry with halfed expire interval until get some inodes to sync > > > > > > > > CC: Jan Kara > > > > Signed-off-by: Wu Fengguang > > > > > > Ok, intuitively this would appear to tie into pageout where we want > > > older inodes to be cleaned first by background flushers to limit the > > > number of dirty pages encountered by page reclaim. If this is accurate, > > > it should be detailed in the changelog. > > > > Good suggestion. I'll add these lines: > > > > This is to help reduce the number of dirty pages encountered by page > > reclaim, eg. the pageout() calls. Normally older inodes contain older > > dirty pages, which are more close to the end of the LRU lists. So > Well, this kind of implicitely assumes that once page is written, it > doesn't get accessed anymore, right? No, this patch is not evicting the page :) > Which I imagine is often true but > not for all workloads... Anyway I think this behavior is a good start > also because it is kind of natural to users to see "old" files written > first. Thanks, Fengguang > > syncing older inodes first helps reducing the dirty pages reached by > > the page reclaim code. > > Honza > -- > Jan Kara > SUSE Labs, CR