From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: + mm-balance_dirty_pages-reduce-calls-to-global_page_state-to-reduce-c ache-references.patch added to -mm tree Date: Sun, 23 Aug 2009 07:31:17 +0200 Message-ID: <1251005477.7538.104.camel@twins> References: <200908212250.n7LMox3g029154@imap1.linux-foundation.org> <20090822025150.GB7798@localhost> <1250964701.7538.101.camel@twins> <20090823013252.GA7661@localhost> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: "akpm@linux-foundation.org" , "mm-commits@vger.kernel.org" , "richard@rsk.demon.co.uk" , "chris.mason@oracle.com" , "jens.axboe@oracle.com" , "mbligh@mbligh.org" , "miklos@szeredi.hu" , "linux-fsdevel@vger.kernel.org" To: Wu Fengguang Return-path: Received: from viefep19-int.chello.at ([62.179.121.39]:1198 "EHLO viefep19-int.chello.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751946AbZHWFbt (ORCPT ); Sun, 23 Aug 2009 01:31:49 -0400 In-Reply-To: <20090823013252.GA7661@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, 2009-08-23 at 09:32 +0800, Wu Fengguang wrote: > > > I'd propose to remove the above 'if' and liberate the following three 'if's. > > > > That might work, but it looses the total dirty_thresh constraint. The > > sum of per-bdi dirties _should_ not be larger than that, but I'm not > > sure it won't ever be. > > > > The clip code Richard removed ensured that, and I think I wrote that out > > of more than sheer paranoia, but I'm not sure anymore :/ > > Oh I assumed that your per-bdi throttling is not too permissive to > exceed the global dirty_thresh. In theory the per-bdi throttling > should be able to quickly stop the growing of (nr_reclaimable + > nr_writeback). Once dirty_thresh is reached we already los Right, so: bdi_thresh_n = dirty_thresh * p(n) + eps. and \Sum_n p(n) = 1 So: \Sum_n bdi_thresh_n = dirty_thresh + n*eps Which yields an O(n) error bound. I'm just not sure how large the thing is in reality, and paranoia won out.