lkml.org 
[lkml]   [2023]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/5] mm: compaction: Avoid fragmentation score calculation for empty zones
Date
There is no need to calculate the fragmentation score for empty zones.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
mm/compaction.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/mm/compaction.c b/mm/compaction.c
index 0fd6c81a7809..b758b00a4885 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2025,6 +2025,8 @@ static unsigned int fragmentation_score_node(pg_data_t *pgdat)
struct zone *zone;

zone = &pgdat->node_zones[zoneid];
+ if (!populated_zone(zone))
+ continue;
score += fragmentation_score_zone_weighted(zone);
}

--
2.27.0
\
 
 \ /
  Last update: 2023-03-26 23:34    [W:0.117 / U:1.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site