From: David Hildenbrand <david@redhat.com>
To: Pedro Gomes <pedrodemargomes@gmail.com>
Cc: SeongJae Park <sj@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
John Hubbard <jhubbard@nvidia.com>
Subject: Re: [PATCH] mm/damon: Add option to monitor only writes
Date: Tue, 8 Feb 2022 10:01:32 +0100 [thread overview]
Message-ID: <dcb5d9c7-ae5c-e0c5-adee-37f5b92281e0@redhat.com> (raw)
In-Reply-To: <CACpbsfapGSbno_n7ZJYJ2E4KkqWdWe_Wz8PuECBa3PZBp2Xnxw@mail.gmail.com>
On 08.02.22 03:05, Pedro Gomes wrote:
> On Mon, Feb 7, 2022 at 7:32 AM David Hildenbrand <david@redhat.com> wrote:
>>
>> Just like clearrefs, this can race against GUP-fast to detect pinned
>> pages. And just like clearrefs, we're not handling PMDs properly. And
>> just like anything that write-protects random anon pages right now, this
>> does not consider O_DIRECT as is.
>>
>> Fortunately, there are not too many users of clearreefs/softdirty
>> tracking out there (my search a while ago returned no open source
>> users). My assumption is that your feature might see more widespread use.
>>
>> Adding more random write protection until we fixed the COW issues [1]
>> really makes my stomach hurt on a Monday morning.
>
> I was not aware of these issues.
>
>> Please, let's defer any more features that rely on write-protecting
>> random anon pages until we have ways in place to not corrupt random user
>> space.
>>
>> That is:
>> 1) Teaching the COW logic to not copy pages that are pinned -- I'm
>> working on that.
>> 2) Converting O_DIRECT to use FOLL_PIN instead of FOLL_GET. John is
>> working on that.
>>
>> So I'm not against this change. I'm against this change at this point in
>> time.
>
> I agree. I will wait until the COW problems are solved to send this patch.
>
>
I'll put you on CC once I have something ready to at least handle pinned
pages (FOLL_PIN) as expected, to not get them accidentally COWed.
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2022-02-08 9:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220203131237.298090-1-pedrodemargomes@gmail.com>
2022-02-03 13:39 ` SeongJae Park
2022-02-04 15:11 ` Pedro Gomes
2022-02-07 8:16 ` SeongJae Park
2022-02-04 1:29 ` kernel test robot
2022-02-04 1:29 ` kernel test robot
2022-02-04 1:30 ` kernel test robot
2022-02-07 10:32 ` David Hildenbrand
2022-02-08 2:05 ` Pedro Gomes
2022-02-08 9:01 ` David Hildenbrand [this message]
2022-02-08 13:18 ` Pedro Gomes
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=dcb5d9c7-ae5c-e0c5-adee-37f5b92281e0@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=pedrodemargomes@gmail.com \
--cc=rostedt@goodmis.org \
--cc=sj@kernel.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