mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mm/vmscan: Use folio_migratetype() instead of get_pageblock_migratetype()
@ 2023-08-25  4:08 Vern Hao
  2023-08-25  7:12 ` David Hildenbrand
  0 siblings, 1 reply; 6+ messages in thread
From: Vern Hao @ 2023-08-25  4:08 UTC (permalink / raw)
  To: akpm; +Cc: zhaoyang.huang, david, linux-mm, linux-kernel, haoxing990, Vern Hao

From: Vern Hao <vernhao@tencent.com>

In skip_cma(), we can use folio_migratetype() to replace get_pageblock_migratetype().

Fixes: 5da226dbfce3 ("mm: skip CMA pages when they are not available")
Signed-off-by: Vern Hao <vernhao@tencent.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 42e3893de2a7..d9e974b96144 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2271,7 +2271,7 @@ static bool skip_cma(struct folio *folio, struct scan_control *sc)
 {
 	return !current_is_kswapd() &&
 			gfp_migratetype(sc->gfp_mask) != MIGRATE_MOVABLE &&
-			get_pageblock_migratetype(&folio->page) == MIGRATE_CMA;
+			folio_migratetype(folio) == MIGRATE_CMA;
 }
 #else
 static bool skip_cma(struct folio *folio, struct scan_control *sc)
-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-25  7:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25  4:08 [PATCH] mm/vmscan: Use folio_migratetype() instead of get_pageblock_migratetype() Vern Hao
2023-08-25  7:12 ` David Hildenbrand
2023-08-25  7:31   ` Vern Hao
2023-08-25  7:34     ` David Hildenbrand
2023-08-25  7:36       ` Vern Hao
2023-08-25  7:37         ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®