linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Barry Song <21cnbao@gmail.com>
Cc: akpm@linux-foundation.org, baolin.wang@linux.alibaba.com,
	chrisl@kernel.org, hanchuanhua@oppo.com, ioworker0@gmail.com,
	kaleshsingh@google.com, kasong@tencent.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	ryan.roberts@arm.com, v-songbaohua@oppo.com, ziy@nvidia.com
Subject: Re: [PATCH RFC 1/2] mm: collect the number of anon large folios
Date: Sun, 11 Aug 2024 10:51:41 +0200	[thread overview]
Message-ID: <fae2def0-918a-495b-a89b-3a8eedd44b1f@redhat.com> (raw)
In-Reply-To: <CAGsJ_4w0SzyA50zNcGAgUc36GOEVr3L6gcZntw4ejBogC9b6+Q@mail.gmail.com>

> the correct place should be:
> 
> @@ -1329,6 +1326,10 @@ static int migrate_folio_move(free_folio_t
> put_new_folio, unsigned long private,
>          if (anon_vma)
>                  put_anon_vma(anon_vma);
>          folio_unlock(src);
> +
> +       if (folio_test_anon(src))
> +               mod_mthp_stat(folio_order(src), MTHP_STAT_NR_ANON, 1);
> +
>          migrate_folio_done(src, reason);
> 
>          return rc;
> 
> Without this modification in migration code, my tests fail, anon_num can
> become negative.

I was wondering if we should do it in __folio_migrate_mapping().

There, we set newfolio->mapping.

-- 
Cheers,

David / dhildenb



  reply	other threads:[~2024-08-11  8:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <41b49313-5804-46ba-9e1d-358b079274cd@redhat.com>
2024-08-09  7:04 ` Barry Song
2024-08-09  7:22   ` David Hildenbrand
2024-08-11  5:20     ` Barry Song
2024-08-11  6:54       ` Barry Song
2024-08-11  8:51         ` David Hildenbrand [this message]
2024-08-11  9:22           ` Barry Song
     [not found] <20240808010457.228753-1-21cnbao@gmail.com>
     [not found] ` <20240808010457.228753-2-21cnbao@gmail.com>
2024-08-09  8:13   ` Ryan Roberts
2024-08-09  8:27     ` Ryan Roberts
2024-08-09  8:40       ` Barry Song
2024-08-09  8:42       ` David Hildenbrand
2024-08-09  8:58         ` David Hildenbrand
2024-08-09  9:05           ` Ryan Roberts
2024-08-09  9:22             ` David Hildenbrand
2024-08-11  8:13               ` Barry Song
2024-08-09  8:39     ` David Hildenbrand
2024-08-09  9:00       ` Ryan Roberts

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=fae2def0-918a-495b-a89b-3a8eedd44b1f@redhat.com \
    --to=david@redhat.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=chrisl@kernel.org \
    --cc=hanchuanhua@oppo.com \
    --cc=ioworker0@gmail.com \
    --cc=kaleshsingh@google.com \
    --cc=kasong@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=v-songbaohua@oppo.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox