[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c837fc02-3dbd-ba88-dacb-cf150272a4c4@redhat.com>
Date: Tue, 3 Oct 2023 23:08:07 +0200
From: David Hildenbrand <david@...hat.com>
To: Peter Xu <peterx@...hat.com>,
Suren Baghdasaryan <surenb@...gle.com>
Cc: Lokesh Gidra <lokeshgidra@...gle.com>,
Jann Horn <jannh@...gle.com>, akpm@...ux-foundation.org,
viro@...iv.linux.org.uk, brauner@...nel.org, shuah@...nel.org,
aarcange@...hat.com, hughd@...gle.com, mhocko@...e.com,
axelrasmussen@...gle.com, rppt@...nel.org, willy@...radead.org,
Liam.Howlett@...cle.com, zhangpeng362@...wei.com,
bgeffon@...gle.com, kaleshsingh@...gle.com, ngeoffray@...gle.com,
jdduke@...gle.com, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, kernel-team@...roid.com
Subject: Re: [PATCH v2 2/3] userfaultfd: UFFDIO_REMAP uABI
On 03.10.23 22:21, Peter Xu wrote:
> On Tue, Oct 03, 2023 at 01:04:44PM -0700, Suren Baghdasaryan wrote:
>> Ok, I think it makes sense to implement the strict remap logic but in
>> a way that we can easily add copy fallback if that's needed in the
>> future. So, I'll change UFFDIO_REMAP to UFFDIO_MOVE and will return
>> some unique error, like EBUSY when the page is not PAE. If we need to
>> add a copy fallback in the future, we will add a
>> UFFDIO_MOVE_MODE_ALLOW_COPY flag and will implement the copy
>> mechanism. Does that sound good?
>
> For the clear failing approach, sounds all good here.
>
> For the name, no strong opinion, but is there any strong one over MOVE?
See my reply regarding MOVE (+zero-copy optimization) vs. REMAP. Just my
thoughts.
REMAP reminds me of mremap, which would never perform any copies,
because it can just do more expensive page remappings (modifying VMAs etc.).
> MOVE is a fine name, however considering UFFDIO_REMAP's long history.. I
> tend to prefer keeping it called as REMAP - it still sounds sane, and
> anyone who knows REMAP will know this is exactly that.
Sorry I have to ask: has this ever been discussed on the list? I don't
see any pointers. If not, then probably the number of people that know
about the history can be counted with my two hands and that shouldn't be
the basis for making decisions.
But again, remap vs. move is for me a semantical difference; and as I am
not a native speaker others might disagree and I might be just wrong.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists