From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: [PATCH 1/6 -v2] writeback: balance_dirty_pages() shall write more than dirtied pages Date: Wed, 23 Sep 2009 21:58:07 +0800 Message-ID: <20090923135807.GA11607@localhost> References: <20090923123337.990689487@intel.com> <20090923124027.456325340@intel.com> <20090923135600.GA11463@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , Theodore Ts'o , Dave Chinner , Chris Mason , Christoph Hellwig , Peter Zijlstra , "linux-fsdevel@vger.kernel.org" , LKML To: Andrew Morton , Jens Axboe Return-path: Content-Disposition: inline In-Reply-To: <20090923135600.GA11463@localhost> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Sep 23, 2009 at 09:56:00PM +0800, Wu Fengguang wrote: > -static inline long sync_writeback_pages(void) > +static inline long sync_writeback_pages(unsigned long dirtied) > { > - return ratelimit_pages + ratelimit_pages / 2; > + if (dirtied < ratelimit_pages) > + dirtied = ratelimit_pages; Just added the above checks. Now balance_dirty_pages() for XFS works in a much larger 1536 chunk size :) [ 40.374081] redirty_tail() +516: inode=131 [ 40.374951] mm/page-writeback.c +543 balance_dirty_pages(): comm=cp pid=3296 n=1536 [ 40.377001] global dirty=49818 writeback=17027 nfs=0 flags=CM towrite=0 skipped=0 > + > + return dirtied + dirtied / 2; > } Thanks, Fengguang