All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Huang, Ying" <ying.huang@linux.alibaba.com>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: akpm@linux-foundation.org,  21cnbao@gmail.com,  david@redhat.com,
	ziy@nvidia.com,  linux-mm@kvack.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: migrate: drop redundant anonymous statistics for file folios migration
Date: Thu, 05 Dec 2024 13:39:15 +0800	[thread overview]
Message-ID: <87v7vy7kos.fsf@DESKTOP-5N7EMDA> (raw)
In-Reply-To: <d5e191ae02c2ab63c70cdf44877fe14fc69f5ae8.1733368611.git.baolin.wang@linux.alibaba.com> (Baolin Wang's message of "Thu, 5 Dec 2024 11:53:48 +0800")

Baolin Wang <baolin.wang@linux.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@linux.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



      parent reply	other threads:[~2024-12-05  5:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05  3:53 [PATCH] mm: migrate: drop redundant anonymous statistics for file folios migration Baolin Wang
2024-12-05  5:00 ` Barry Song
2024-12-05  6:06   ` Baolin Wang
2024-12-05  6:33     ` Barry Song
2024-12-05  6:50       ` Baolin Wang
2024-12-05  5:39 ` Huang, Ying [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v7vy7kos.fsf@DESKTOP-5N7EMDA \
    --to=ying.huang@linux.alibaba.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.