From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: + mm-balance_dirty_pages-reduce-calls-to-global_page_state-to-reduce-c ache-references.patch added to -mm tree Date: Thu, 3 Sep 2009 11:09:05 +0800 Message-ID: <20090903030905.GA12739@localhost> References: <200908212250.n7LMox3g029154@imap1.linux-foundation.org> <20090822025150.GB7798@localhost> <1250964701.7538.101.camel@twins> <1251880300.7547.91.camel@twins> <20090902095739.GA31516@localhost> <1251888324.7547.147.camel@twins> <1251899612.2284.29.camel@castor> <20090903022223.GB9474@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Peter Zijlstra , "akpm@linux-foundation.org" , "mm-commits@vger.kernel.org" , "chris.mason@oracle.com" , "jens.axboe@oracle.com" , "mbligh@mbligh.org" , "miklos@szeredi.hu" , "linux-fsdevel@vger.kernel.org" To: Richard Kennedy Return-path: Received: from mga14.intel.com ([143.182.124.37]:1597 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753963AbZICDJO (ORCPT ); Wed, 2 Sep 2009 23:09:14 -0400 Content-Disposition: inline In-Reply-To: <20090903022223.GB9474@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Sep 03, 2009 at 10:22:23AM +0800, Wu Fengguang wrote: > So I suggested just remove clip_bdi_dirty_limit(). To be sure, could > run with the following patch and check if big numbers are showed. > Simple tests show that clip_bdi_dirty_limit() is no-op with one single disk and 1-2 dirtier(s): [...] [ 720.630917] clip_bdi_dirty_limit 0 [ 720.753865] clip_bdi_dirty_limit 0 [ 720.915198] clip_bdi_dirty_limit 0 [ 721.149511] clip_bdi_dirty_limit 0 [...] Thanks, Fengguang > --- linux-mm.orig/mm/page-writeback.c 2009-09-02 17:16:51.000000000 +0800 > +++ linux-mm/mm/page-writeback.c 2009-09-03 10:19:00.000000000 +0800 > @@ -258,6 +258,7 @@ static void clip_bdi_dirty_limit(struct > unsigned long dirty, unsigned long *pbdi_dirty) > { > unsigned long avail_dirty; > + unsigned long delta; > > avail_dirty = global_page_state(NR_FILE_DIRTY) + > global_page_state(NR_WRITEBACK) + > @@ -272,6 +273,11 @@ static void clip_bdi_dirty_limit(struct > avail_dirty += bdi_stat(bdi, BDI_RECLAIMABLE) + > bdi_stat(bdi, BDI_WRITEBACK); > > + delta = *pbdi_dirty - min(*pbdi_dirty, avail_dirty); > + delta *= 1024; > + delta /= *pbdi_dirty + 1; > + printk("clip_bdi_dirty_limit %lu\n", delta); > + > *pbdi_dirty = min(*pbdi_dirty, avail_dirty); > } >