Skip to content

Commit 4f9f477

Browse files
jiangliutorvalds
authored andcommitted
mm: use managed_pages to calculate default zonelist order
Use zone->managed_pages instead of zone->present_pages to calculate default zonelist order because managed_pages means allocatable pages. Signed-off-by: Jiang Liu <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: David Howells <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Cc: Jianguo Wu <[email protected]> Cc: Joonsoo Kim <[email protected]> Cc: Kamezawa Hiroyuki <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Michel Lespinasse <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Tang Chen <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Wen Congyang <[email protected]> Cc: Will Deacon <[email protected]> Cc: Yasuaki Ishimatsu <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Russell King <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 834405c commit 4f9f477

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/page_alloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3438,8 +3438,8 @@ static int default_zonelist_order(void)
34383438
z = &NODE_DATA(nid)->node_zones[zone_type];
34393439
if (populated_zone(z)) {
34403440
if (zone_type < ZONE_NORMAL)
3441-
low_kmem_size += z->present_pages;
3442-
total_size += z->present_pages;
3441+
low_kmem_size += z->managed_pages;
3442+
total_size += z->managed_pages;
34433443
} else if (zone_type == ZONE_NORMAL) {
34443444
/*
34453445
* If any node has only lowmem, then node order

0 commit comments

Comments
 (0)