LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <cl@linux-foundation.org>,
Nick Piggin <npiggin@suse.de>, Paul Menage <menage@google.com>,
Derek Fults <dfults@sgi.com>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 3/7] mm: make page writeback obey cpuset constraints
Date: Thu, 30 Oct 2008 02:10:24 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.0810300203360.29917@chino.kir.corp.google.com> (raw)
In-Reply-To: <1225356120.7803.5.camel@twins>
On Thu, 30 Oct 2008, Peter Zijlstra wrote:
> On Tue, 2008-10-28 at 12:18 -0700, David Rientjes wrote:
> > On Tue, 28 Oct 2008, Peter Zijlstra wrote:
> >
> > > > + is_subset = cpuset_populate_dirty_limits(dl, &dirtyable_memory,
> > > > + &nr_mapped, nodes);
> > > > + if (!is_subset) {
> > > > + dl->nr_dirty = global_page_state(NR_FILE_DIRTY);
> > > > + dl->nr_unstable = global_page_state(NR_UNSTABLE_NFS);
> > > > + dl->nr_writeback = global_page_state(NR_WRITEBACK);
> > > > + dirtyable_memory = determine_dirtyable_memory();
> > > > + nr_mapped = global_page_state(NR_FILE_MAPPED) +
> > > > + global_page_state(NR_ANON_PAGES);
> > > > + } else
> > > > + dirtyable_memory -= highmem_dirtyable_memory(nodes,
> > > > + dirtyable_memory);
> > >
> > > Why not fold that all into cpuset_populate_dirty_limits() ?
> > >
> >
> > cpuset_populate_dirty_limits() is a no-op on !CONFIG_CPUSETS kernels.
>
> Right, humm. Maybe introduce a populate_dirty_limits() and differentiate
> that between CONFIG_CPUSETS and not, and make it do everything.
>
> That would get rid of this fudge I think, no?
>
I agree it would look much cleaner and I actually did that originally, but
it requires adding #ifdef's for CONFIG_CPUSETS to mm/page-writeback.c
since highmem_dirtyable_memory() is static.
There's actually nothing cpuset-specific about
cpuset_populate_dirty_limits() and it could be used for !CONFIG_CPUSETS
kernels, but there's a performance benefit of using the global ZVC values
for the page stats as opposed to iterating over each node and adding their
respective values. So is_subset is only non-zero when the passed nodemask
excludes system nodes (the cpuset case), and we must iterate the node ZVC
values.
So perhaps the solution is to introduce populate_nodemask_dirty_limits()
and populate_global_dirty_limits() both in mm/page-writeback.c?
next prev parent reply other threads:[~2008-10-30 9:11 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-28 16:08 [patch 1/7] cpusets: add dirty map to struct address_space David Rientjes
2008-10-28 16:08 ` [patch 2/7] pdflush: allow the passing of a nodemask parameter David Rientjes
2008-10-28 16:08 ` [patch 3/7] mm: make page writeback obey cpuset constraints David Rientjes
2008-10-28 17:31 ` Peter Zijlstra
2008-10-28 19:16 ` David Rientjes
2008-10-28 17:32 ` Peter Zijlstra
2008-10-28 19:18 ` David Rientjes
2008-10-30 8:42 ` Peter Zijlstra
2008-10-30 9:10 ` David Rientjes [this message]
2008-10-30 9:34 ` Peter Zijlstra
2008-10-28 16:08 ` [patch 4/7] mm: cpuset aware reclaim writeout David Rientjes
2008-10-28 16:08 ` [patch 5/7] mm: throttle writeout with cpuset awareness David Rientjes
2008-10-28 16:08 ` [patch 6/7] cpusets: per cpuset dirty ratios David Rientjes
2008-10-30 6:59 ` Paul Menage
2008-10-30 8:48 ` David Rientjes
2008-10-30 15:28 ` Christoph Lameter
2008-10-30 8:44 ` Peter Zijlstra
2008-10-30 9:03 ` David Rientjes
2008-10-30 9:34 ` Peter Zijlstra
2008-10-30 10:02 ` David Rientjes
2008-10-28 16:08 ` [patch 7/7] cpusets: update documentation for writeback throttling David Rientjes
2008-10-30 16:06 ` Christoph Lameter
2008-10-28 17:37 ` [patch 1/7] cpusets: add dirty map to struct address_space Peter Zijlstra
2008-10-28 20:48 ` David Rientjes
2008-10-29 1:13 ` David Rientjes
2008-10-29 2:24 ` David Rientjes
2008-10-30 8:38 ` Peter Zijlstra
2008-10-28 17:46 ` Peter Zijlstra
2008-10-28 19:19 ` David Rientjes
2008-10-30 19:23 [patch 0/7] cpuset writeback throttling David Rientjes
2008-10-30 19:23 ` [patch 3/7] mm: make page writeback obey cpuset constraints David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.00.0810300203360.29917@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=dfults@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=npiggin@suse.de \
--cc=peterz@infradead.org \
--subject='Re: [patch 3/7] mm: make page writeback obey cpuset constraints' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).