From: "Gregory Price (Meta)" set_recommended_min_free_kbytes() reserves two pageblocks per populated zone to help THP allocations avoid fragmentation. The reserve serves ordinary allocations, which use only common memory, so count only the zones on N_MEMORY_COMMON nodes. Signed-off-by: Gregory Price (Meta) --- mm/khugepaged.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 2dc4245814df..a930d99f89da 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -3151,6 +3151,9 @@ void set_recommended_min_free_kbytes(void) } for_each_populated_zone(zone) { + if (!node_state(zone_to_nid(zone), N_MEMORY_COMMON)) + continue; + /* * We don't need to worry about fragmentation of * ZONE_MOVABLE since it only has movable pages. -- 2.56.1