From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: what is the point of nr_pages information for the flusher thread? Date: Wed, 7 Jul 2010 19:43:16 -0400 Message-ID: <20100707234316.GA21990@infradead.org> References: <20100707231611.GA24281@infradead.org> <20100707163710.a46173b2.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , fengguang.wu@intel.com, mel@csn.ul.ie, npiggin@suse.de, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org To: Andrew Morton Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:42471 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756281Ab0GGXnr (ORCPT ); Wed, 7 Jul 2010 19:43:47 -0400 Content-Disposition: inline In-Reply-To: <20100707163710.a46173b2.akpm@linux-foundation.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Jul 07, 2010 at 04:37:10PM -0700, Andrew Morton wrote: > On Wed, 7 Jul 2010 19:16:11 -0400 > Christoph Hellwig wrote: > > > Currently there's three possible values we pass into the flusher thread > > for the nr_pages arguments: > > I assume you're referring to wakeup_flusher_threads(). In that context I refer to everything using the per-bdi flusher thread. That includes wakeup_flusher_threads() and the functions I've mentioned below. > There's also free_more_memory() and do_try_to_free_pages(). Indeed. So we still have some special cases that want a specific number to be written back globally. > wakeup_flusher_threads() apepars to have been borked. It passes > nr_pages() into *each* bdi hence can write back far more than it was > asked to. > > But seriously, how is the _global_ number of dirty and unstable pages > > a good indicator for the amount of writeback per-bdi or superblock > > anyway? > > It isn't. This appears to have been an attempt to transport the > wakeup_pdflush() functionality into the new wakeup_flusher_threads() > regime. Badly. Unfortunately we don't just use it for wakeup_flusher_threads() but also for various bits of per-bdi and per-sb writeback.