[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v7vy7kos.fsf@DESKTOP-5N7EMDA>
Date: Thu, 05 Dec 2024 13:39:15 +0800
From: "Huang, Ying" <ying.huang@...ux.alibaba.com>
To: Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc: akpm@...ux-foundation.org, 21cnbao@...il.com, david@...hat.com,
ziy@...dia.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: migrate: drop redundant anonymous statistics for
file folios migration
Baolin Wang <baolin.wang@...ux.alibaba.com> writes:
> Commit 5d65c8d758f2 ("mm: count the number of anonymous THPs per size") adds
> a new anonymous counter per THP size, however, when folio_mapping() is not NULL
> during folio migration, it means this is not an anonymous folio, so remove the
> redundant anonymous statistics in this case.
They may be anonymous folios in swap cache?
> Signed-off-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
> ---
> mm/migrate.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index e9e00d1d1d19..d7fdfdd23fd0 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -523,8 +523,6 @@ static int __folio_migrate_mapping(struct address_space *mapping,
> */
> newfolio->index = folio->index;
> newfolio->mapping = folio->mapping;
> - if (folio_test_anon(folio) && folio_test_large(folio))
> - mod_mthp_stat(folio_order(folio), MTHP_STAT_NR_ANON, 1);
> folio_ref_add(newfolio, nr); /* add cache reference */
> if (folio_test_swapbacked(folio)) {
> __folio_set_swapbacked(newfolio);
---
Best Regards,
Huang, Ying
Powered by blists - more mailing lists