[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1102221333100.5929@chino.kir.corp.google.com>
Date: Tue, 22 Feb 2011 13:42:00 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Andi Kleen <andi@...stfloor.org>
cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Andrea Arcangeli <aarcange@...hat.com>, lwoodman@...hat.com,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 6/8] Add __GFP_OTHER_NODE flag
On Mon, 21 Feb 2011, Andi Kleen wrote:
> From: Andi Kleen <ak@...ux.intel.com>
>
> Add a new __GFP_OTHER_NODE flag to tell the low level numa statistics
> in zone_statistics() that an allocation is on behalf of another thread.
> This way the local and remote counters can be still correct, even
> when background daemons like khugepaged are changing memory
> mappings.
>
> This only affects the accounting, but I think it's worth doing that
> right to avoid confusing users.
>
This makes the accounting worse, NUMA_LOCAL is defined as "allocation from
local node," meaning it's local to the allocating cpu, not local to the
node being targeted.
Further, preferred_zone has taken on a much more significant meaning other
than just statistics: it impacts the behavior of memory compaction and how
long congestion timeouts are, if a timeout is taken at all, depending on
the I/O being done on behalf of the zone.
A better way to address the issue is by making sure preferred_zone is
actually correct by using the appropriate zonelist to be passed into the
allocator in the first place.
> I first tried to just pass down the right node, but this required
> a lot of changes to pass down this parameter and at least one
> addition of a 10th argument to a 9 argument function. Using
> the flag is a lot less intrusive.
>
And adding a branch to every successful page allocation for statistics
isn't intrusive?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists