From: Yin Fengwei <fengwei.yin@intel.com>
To: Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>,
Lorenzo Stoakes <lstoakes@gmail.com>,
Stefan Roesch <shr@devkernel.io>, <linux-kernel@vger.kernel.org>,
<linux-mm@kvack.org>
Subject: Re: [PATCH] mm: mlock: avoid folio_within_range() on KSM pages
Date: Tue, 24 Oct 2023 15:09:26 +0800 [thread overview]
Message-ID: <35b325ba-8575-900c-5746-8586f9b2c42d@intel.com> (raw)
In-Reply-To: <23852f6a-5bfa-1ffd-30db-30c5560ad426@google.com>
Hi Huge,
On 10/24/23 14:38, Hugh Dickins wrote:
> Since mm-hotfixes-stable commit dc68badcede4 ("mm: mlock: update
> mlock_pte_range to handle large folio") I've just occasionally seen
> VM_WARN_ON_FOLIO(folio_test_ksm) warnings from folio_within_range(),
> in a splurge after testing with KSM hyperactive.
>
> folio_referenced_one()'s use of folio_within_vma() is safe because
> it checks folio_test_large() first; but allow_mlock_munlock() needs
> to do the same to avoid those warnings (or check !folio_test_ksm()
> itself? or move either check into folio_within_range()? hard to tell
> without more examples of its use).
Checking folio_test_large() here looks fine to me now. If KSM could support
large folio in the future (Not sure whether this will happen in the future),
we could revise.
>
> Fixes: dc68badcede4 ("mm: mlock: update mlock_pte_range to handle large folio")
> Signed-off-by: Hugh Dickins <hughd@google.com>
Thanks a lot for catching this issue and fixing it.
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
prev parent reply other threads:[~2023-10-24 7:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 6:38 Hugh Dickins
2023-10-24 7:09 ` Yin Fengwei [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=35b325ba-8575-900c-5746-8586f9b2c42d@intel.com \
--to=fengwei.yin@intel.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=shr@devkernel.io \
--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