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 09:45:24 +0200 Message-ID: <1251013524.7538.105.camel@twins> References: <200908212250.n7LMox3g029154@imap1.linux-foundation.org> <20090822025150.GB7798@localhost> <1250964701.7538.101.camel@twins> <20090823013252.GA7661@localhost> <1251005477.7538.104.camel@twins> <20090823072705.GA4028@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 viefep17-int.chello.at ([62.179.121.37]:52670 "EHLO viefep17-int.chello.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753716AbZHWHp7 (ORCPT ); Sun, 23 Aug 2009 03:45:59 -0400 In-Reply-To: <20090823072705.GA4028@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, 2009-08-23 at 15:27 +0800, Wu Fengguang wrote: > On Sun, Aug 23, 2009 at 01:31:17PM +0800, Peter Zijlstra wrote: > > 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. > > A wild question: is it possible to make the equation: > > bdi_thresh_n = dirty_thresh * p(n) - eps. Possibly, I'd have to go over the math to get a proper equation for eps, then see what needs to be done to get avg(eps) <= 0.