All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mm/vmscan: Use folio_migratetype() instead of get_pageblock_migratetype()
@ 2023-08-25  7:57 Vern Hao
  2023-08-25  8:03 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Vern Hao @ 2023-08-25  7:57 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().

Signed-off-by: Vern Hao <vernhao@tencent.com>
---
v1 -> v2
	- remove "Fixs:xxx" as David Hildenbrand suggestion.

 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 2b5d61eeb039..850811bb5699 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.41.0


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

* Re: [PATCH v2] mm/vmscan: Use folio_migratetype() instead of get_pageblock_migratetype()
  2023-08-25  7:57 [PATCH v2] mm/vmscan: Use folio_migratetype() instead of get_pageblock_migratetype() Vern Hao
@ 2023-08-25  8:03 ` David Hildenbrand
  0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2023-08-25  8:03 UTC (permalink / raw)
  To: Vern Hao, akpm; +Cc: zhaoyang.huang, linux-mm, linux-kernel, Vern Hao

On 25.08.23 09:57, Vern Hao wrote:
> From: Vern Hao <vernhao@tencent.com>
> 
> In skip_cma(), we can use folio_migratetype() to replace get_pageblock_migratetype().
> 
> Signed-off-by: Vern Hao <vernhao@tencent.com>
> ---
> v1 -> v2
> 	- remove "Fixs:xxx" as David Hildenbrand suggestion.
> 
>   mm/vmscan.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 2b5d61eeb039..850811bb5699 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;

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25  7:57 [PATCH v2] mm/vmscan: Use folio_migratetype() instead of get_pageblock_migratetype() Vern Hao
2023-08-25  8:03 ` David Hildenbrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.