mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 15:42:32 +00:00
[PATCH] NUMA: Add zone_to_nid function
There are many places where we need to determine the node of a zone. Currently we use a difficult to read sequence of pointer dereferencing. Put that into an inline function and use throughout VM. Maybe we can find a way to optimize the lookup in the future. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
4415cc8df6
commit
89fa30242f
9 changed files with 17 additions and 13 deletions
|
@ -177,8 +177,7 @@ static inline int constrained_alloc(struct zonelist *zonelist, gfp_t gfp_mask)
|
|||
|
||||
for (z = zonelist->zones; *z; z++)
|
||||
if (cpuset_zone_allowed(*z, gfp_mask))
|
||||
node_clear((*z)->zone_pgdat->node_id,
|
||||
nodes);
|
||||
node_clear(zone_to_nid(*z), nodes);
|
||||
else
|
||||
return CONSTRAINT_CPUSET;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue