kvm-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kirill.shutemov@linux.intel.com <kirill.shutemov@linux.intel.com>
To: kvm-riscv@lists.infradead.org
Subject: [PATCH gmem FIXUP] mm, compaction: make testing mapping_unmovable() safe
Date: Sat, 2 Sep 2023 00:05:55 +0300	[thread overview]
Message-ID: <20230901210555.j5d5a4azmkxzlnn2@box.shutemov.name> (raw)
In-Reply-To: <20230901082025.20548-2-vbabka@suse.cz>

On Fri, Sep 01, 2023 at 10:20:26AM +0200, 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.
> 
> Also incorporate comment update suggested by Matthew.
> 
> Fixes: 3424873596ce ("mm: Add AS_UNMOVABLE to mark mapping as completely unmovable")
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

Superficially looks good to me. But I don't really understand this
code path to Ack.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov


  reply	other threads:[~2023-09-01 21:05 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 [this message]
2023-09-02 13:59 ` Matthew Wilcox
2023-09-05 23:56 ` Sean Christopherson
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=20230901210555.j5d5a4azmkxzlnn2@box.shutemov.name \
    --to=kirill.shutemov@linux.intel.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).