linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Lance Yang <ioworker0@gmail.com>
To: david@redhat.com, akpm@linux-foundation.org, yjnworkstation@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	willy@infradead.org, 00107082@163.com, libang.li@antgroup.com,
	Lance Yang <ioworker0@gmail.com>
Subject: Re: [PATCH] mm: init_mlocked_on_free_v3
Date: Sat,  1 Jun 2024 22:09:17 +0800	[thread overview]
Message-ID: <20240601140917.43562-1-ioworker0@gmail.com> (raw)
In-Reply-To: <8118eabf-de9c-41a7-9892-3a1a5bd2071c@redhat.com>

Completely agree with David's point[1]. I'm also not convinced that this is the
right approach :)

It seems like this patch won't handle all cases, as David mentioned[1] before.
folio_remove_rmap_ptes() will immediately munlock a large folio (as large folios
are not allowed to be batch-added to the LRU list) via munlock_vma_folio() when
it is fully unmapped, so this patch does not work in this case. Even worse, if
we encounter a COW mlocked folio, we would run into trouble (data corruption).

Hi Andrew, I just noticed that this patch has become part of v6.10-rc1, but it
has not been acked/reviewed yet. Is there any chance to revert it?

[1] https://lore.kernel.org/linux-mm/8118eabf-de9c-41a7-9892-3a1a5bd2071c@redhat.com/
[2] https://lore.kernel.org/linux-mm/20240517192239.9285edd85f8ef893bb508a61@linux-foundation.org/

Thanks,
Lance


  reply	other threads:[~2024-06-01 14:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 14:56 York Jasper Niebuhr
2024-04-01 22:34 ` Yuanchu Xie
2024-04-02 10:43 ` David Hildenbrand
2024-06-01 14:09   ` Lance Yang [this message]
2024-06-01 15:34     ` David Hildenbrand
  -- strict thread matches above, loose matches on Subject: below --
2024-03-29 11:54 York Jasper Niebuhr
2024-03-29 12:26 ` Matthew Wilcox

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=20240601140917.43562-1-ioworker0@gmail.com \
    --to=ioworker0@gmail.com \
    --cc=00107082@163.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=libang.li@antgroup.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    --cc=yjnworkstation@gmail.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