All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Axel Rasmussen <axelrasmussen@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	linux-kernel@vger.kernel.org, linux-man@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] ioctl_userfaultfd.2, userfaultfd.2: add minor fault mode
Date: Thu, 3 Jun 2021 15:28:57 -0400	[thread overview]
Message-ID: <YLkteUqSmXFxSJNt@t490s> (raw)
In-Reply-To: <20210603183216.939169-1-axelrasmussen@google.com>

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.

[...]

> @@ -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"?

[...]

> +.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..).

> +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-03 19:29 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 [this message]
2021-06-04 19:50   ` Axel Rasmussen
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=YLkteUqSmXFxSJNt@t490s \
    --to=peterx@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --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 \
    /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.