From: Sean Christopherson <seanjc@google.com>
To: kvm-riscv@lists.infradead.org
Subject: [PATCH gmem FIXUP] mm, compaction: make testing mapping_unmovable() safe
Date: Tue, 5 Sep 2023 16:56:31 -0700 [thread overview]
Message-ID: <ZPfAL0D95AwXD9tg@google.com> (raw)
In-Reply-To: <20230901082025.20548-2-vbabka@suse.cz>
On Fri, Sep 01, 2023, Vlastimil Babka wrote:
> As Kirill pointed out, mapping can be removed under us due to
> truncation. Test it under folio lock as already done for the async
> compaction / dirty folio case. To prevent locking every folio with
> mapping to do the test, do it only for unevictable folios, as we can
> expect the unmovable mapping folios are also unevictable - it is the
> case for guest memfd folios.
Rather than expect/assume that unmovable mappings are always unevictable, how about
requiring that? E.g. either through a VM_WARN_ON in mapping_set_unmovable(), or by
simply having that helper forcefully set AS_UNEVICTABLE as well.
next prev parent reply other threads:[~2023-09-05 23:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-01 8:20 [PATCH gmem FIXUP] mm, compaction: make testing mapping_unmovable() safe Vlastimil Babka
2023-09-01 21:05 ` kirill.shutemov
2023-09-02 13:59 ` Matthew Wilcox
2023-09-05 23:56 ` Sean Christopherson [this message]
2023-09-06 8:00 ` Vlastimil Babka
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=ZPfAL0D95AwXD9tg@google.com \
--to=seanjc@google.com \
--cc=kvm-riscv@lists.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;
as well as URLs for NNTP newsgroup(s).