lkml.org 
[lkml]   [2020]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] mm/gup: Allow real explicit breaking of COW
On Mon, Aug 10, 2020 at 2:57 PM Peter Xu <peterx@redhat.com> wrote:
>
> Yeah, that's why I totally agree we need to do enforced COW even for a read gup
> as long as the page can be further referenced (GET|PIN). However frankly
> speaking I didn't follow the rest on what's wrong with "Userfaultfd-wp should
> not care about this because it's not a write operation" that I mentiond. Is
> that the major part of the objection?

You didn't _explain_ why it's ok.

You said "it's only reading".

And I told you why "only reading" is not an argument against COW.

So my objection is that you haven't actually explained why it's ok for
userfaultfd-wp.

I can easily believe that it is, but my whole point is that this is
subtle, and it needs documentation and explanation.

That's also why I think the bit should be the other way: the people
who need to explain are the ones that disable COW, and the reversed
bit would mark that case.

The people who are ok with COW don't need to explain anything, and for
the same reason I think they shouldn't need to add that
FAULT_FLAG_BREAK_COW.

See what my argument is? It's entirely about documenting the special case.

Linus

\
 
 \ /
  Last update: 2020-08-11 01:20    [W:0.071 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site