Re: [PATCH 6/8] Add __GFP_OTHER_NODE flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Feb 2011, Andi Kleen wrote:

> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> 
> 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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]