Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754936Ab0GLVxr (ORCPT ); Mon, 12 Jul 2010 17:53:47 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:59316 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754489Ab0GLVxp (ORCPT ); Mon, 12 Jul 2010 17:53:45 -0400 Date: Mon, 12 Jul 2010 14:52:06 -0700 From: Andrew Morton To: Wu Fengguang Cc: Christoph Hellwig , Richard Kennedy , Dave Chinner , Jan Kara , Peter Zijlstra , , Linux Memory Management List , LKML , Miklos Szeredi Subject: Re: [PATCH 1/6] writeback: take account of NR_WRITEBACK_TEMP in balance_dirty_pages() Message-Id: <20100712145206.9808b411.akpm@linux-foundation.org> In-Reply-To: <20100711021748.594522648@intel.com> References: <20100711020656.340075560@intel.com> <20100711021748.594522648@intel.com> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1521 Lines: 40 On Sun, 11 Jul 2010 10:06:57 +0800 Wu Fengguang wrote: > > Signed-off-by: Richard Kennedy > Signed-off-by: Wu Fengguang > --- > mm/page-writeback.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > --- linux-next.orig/mm/page-writeback.c 2010-07-11 08:41:37.000000000 +0800 > +++ linux-next/mm/page-writeback.c 2010-07-11 08:42:14.000000000 +0800 > @@ -503,11 +503,12 @@ static void balance_dirty_pages(struct a > }; > > get_dirty_limits(&background_thresh, &dirty_thresh, > - &bdi_thresh, bdi); > + &bdi_thresh, bdi); > > nr_reclaimable = global_page_state(NR_FILE_DIRTY) + > - global_page_state(NR_UNSTABLE_NFS); > - nr_writeback = global_page_state(NR_WRITEBACK); > + global_page_state(NR_UNSTABLE_NFS); > + nr_writeback = global_page_state(NR_WRITEBACK) + > + global_page_state(NR_WRITEBACK_TEMP); > > bdi_nr_reclaimable = bdi_stat(bdi, BDI_RECLAIMABLE); > bdi_nr_writeback = bdi_stat(bdi, BDI_WRITEBACK); > hm, OK. I wonder whether we could/should have unified NR_WRITEBACK_TEMP and NR_UNSTABLE_NFS. Their "meanings" aren't quite the same, but perhaps some "treat page as dirty because the fs is futzing with it" thing. -- 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/