From: Hugh Dickins <hughd@google.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH next] mm/migrate: fix remove_migration_pte() of hugetlb entry
Date: Mon, 28 Feb 2022 14:18:39 -0800 (PST) [thread overview]
Message-ID: <561c5d85-93fa-3926-2d3d-30f83e99ab5c@google.com> (raw)
In-Reply-To: <Yh01WH6CdHjpUFkZ@casper.infradead.org>
On Mon, 28 Feb 2022, Matthew Wilcox wrote:
> On Sat, Feb 26, 2022 at 06:25:15PM -0800, Hugh Dickins wrote:
> > - if (!folio_test_ksm(folio))
> > + /* Skip call in common case, plus .pgoff is invalid for KSM */
> > + if (pvmw.nr_pages != 1 && !folio_test_hugetlb(folio))
> > idx = linear_page_index(vma, pvmw.address) - pvmw.pgoff;
>
> How do you feel about this instead?
>
> - if (!folio_test_ksm(folio))
> + /* pgoff is invalid for ksm pages, but they are never large */
> + if (folio_test_large(folio) && !folio_test_hugetlb(folio))
> idx = linear_page_index(vma, pvmw.address) - pvmw.pgoff;
>
That looks nicer to me too. I'll assume that's what you will add
or squash in your tree, and no need for me to resend - thanks.
Hugh
prev parent reply other threads:[~2022-02-28 22:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-27 2:25 Hugh Dickins
2022-02-28 20:49 ` Matthew Wilcox
2022-02-28 22:18 ` Hugh Dickins [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=561c5d85-93fa-3926-2d3d-30f83e99ab5c@google.com \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
/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