linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Zi Yan <ziy@nvidia.com>
To: David Hildenbrand <david@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Yosry Ahmed <yosryahmed@google.com>
Subject: Re: [PATCH v1] mm/rmap: cleanup partially-mapped handling in __folio_remove_rmap()
Date: Thu, 20 Jun 2024 21:49:12 -0400	[thread overview]
Message-ID: <E5B837D4-A5EE-4EFB-A80E-20DEFC80FAD2@nvidia.com> (raw)
In-Reply-To: <20240618151026.521019-1-david@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

On 18 Jun 2024, at 11:10, David Hildenbrand wrote:

> Let's simplify and reduce code indentation. In the RMAP_LEVEL_PTE case, we
> already check for nr when computing partially_mapped.
>
> For RMAP_LEVEL_PMD, it's a bit more confusing. Likely, we don't need the
> "nr" check, but we could have "nr < nr_pmdmapped" also if we stumbled
> into the "/* Raced ahead of another remove and an add? */" case. So
> let's simply move the nr check in there.
>
> Note that partially_mapped is always false for small folios.
>
> No functional change intended.
>
> Cc: Yosry Ahmed <yosryahmed@google.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  mm/rmap.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)

LGTM. Reviewed-by: Zi Yan <ziy@nvidia.com>

--
Best Regards,
Yan, Zi

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]

  reply	other threads:[~2024-06-21  1:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 15:10 David Hildenbrand
2024-06-21  1:49 ` Zi Yan [this message]
2024-06-24 11:48 ` Yosry Ahmed
2024-07-10 21:40   ` David Hildenbrand

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=E5B837D4-A5EE-4EFB-A80E-20DEFC80FAD2@nvidia.com \
    --to=ziy@nvidia.com \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=yosryahmed@google.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