mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +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:
committed by
Linus Torvalds
parent
4415cc8df6
commit
89fa30242f
@@ -72,7 +72,7 @@ static struct page *dequeue_huge_page(struct vm_area_struct *vma,
|
||||
struct zone **z;
|
||||
|
||||
for (z = zonelist->zones; *z; z++) {
|
||||
nid = (*z)->zone_pgdat->node_id;
|
||||
nid = zone_to_nid(*z);
|
||||
if (cpuset_zone_allowed(*z, GFP_HIGHUSER) &&
|
||||
!list_empty(&hugepage_freelists[nid]))
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user