All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Rasmussen <axelrasmussen@google.com>
To: Peter Xu <peterx@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-man@vger.kernel.org, Linux MM <linux-mm@kvack.org>
Subject: Re: [PATCH] ioctl_userfaultfd.2, userfaultfd.2: add minor fault mode
Date: Fri, 4 Jun 2021 12:50:17 -0700	[thread overview]
Message-ID: <CAJHvVciZnw5rBApeoAyqW+mLVumUWme+V40eZe7ZNacwuPAZJA@mail.gmail.com> (raw)
In-Reply-To: <YLkteUqSmXFxSJNt@t490s>

Thanks for the review, Peter! I'll send a v2 shortly to address the suggestions.

On Thu, Jun 3, 2021 at 12:29 PM Peter Xu <peterx@redhat.com> wrote:
>
> On Thu, Jun 03, 2021 at 11:32:16AM -0700, Axel Rasmussen wrote:
>
> [...]
>
> Not a native speaker, feel free to take anything I said with a grain of salt..
>
> > @@ -278,14 +287,8 @@ by the current kernel version.
> >  (Since Linux 4.3.)
> >  Register a memory address range with the userfaultfd object.
> >  The pages in the range must be "compatible".
> > -.PP
> > -Up to Linux kernel 4.11,
> > -only private anonymous ranges are compatible for registering with
> > -.BR UFFDIO_REGISTER .
> > -.PP
> > -Since Linux 4.11,
> > -hugetlbfs and shared memory ranges are also compatible with
> > -.BR UFFDIO_REGISTER .
> > +What constitutes "compatible" depends on the mode(s) being used, as described
> > +below.
>
> Would below be slightly better?
>
>   Please refer to the list of register modes below for the compatible memory
>   backends for each mode.

I have no significant preference between the two, so happy to reword this one.

>
> [...]
>
> > @@ -735,6 +745,109 @@ or not registered with userfaultfd write-protect mode.
> >  .TP
> >  .B EFAULT
> >  Encountered a generic fault during processing.
> > +.\"
> > +.SS UFFDIO_CONTINUE
> > +(Since Linux 5.13.)
> > +Used for resolving minor faults specifically.
> > +Take the existing page(s) in the range registered with
> > +.B UFFDIO_REGISTER_MODE_MINOR
> > +and install page table entries for them.
>
> "Take the existing page" reads a bit weird to me.  How about something like:
> "Resolving minor-mode trapped page faults by installing page table entries with
> pages in the page cache"?

Agreed, "take" is a bit awkward. I'll reword to something close to
your suggestion.

>
> [...]
>
> > +.TP
> > +.B EINVAL
> > +An invalid bit was specified in the
> > +.IR mode
> > +field.
> > +.TP
> > +.B EEXIST
> > +One or more pages were already mapped in the given range.
>
> I'd think this sentence is good enough; slightly prefer dropping the latter one
> "In other words..." below, as "mapped" should mean the same to me (and the
> wording "fully mapped" is a bit confusing too..).

Fair enough, I had it that way at first but was worried the first
sentence alone was too vague. I'm probably overthinking it. ;) I'll
just drop the second sentence.

>
> > +In other words, not only did pages exist in the page cache, but page table
> > +entries already existed for those pages and they were fully mapped.
>
> [...]
>
> Thanks,
>
> --
> Peter Xu
>

  reply	other threads:[~2021-06-04 19:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 18:32 [PATCH] ioctl_userfaultfd.2, userfaultfd.2: add minor fault mode Axel Rasmussen
2021-06-03 18:32 ` Axel Rasmussen
2021-06-03 19:28 ` Peter Xu
2021-06-04 19:50   ` Axel Rasmussen [this message]
2021-06-04 19:50     ` Axel Rasmussen

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=CAJHvVciZnw5rBApeoAyqW+mLVumUWme+V40eZe7ZNacwuPAZJA@mail.gmail.com \
    --to=axelrasmussen@google.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=peterx@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.