linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: James Houghton <jthoughton@google.com>
To: Axel Rasmussen <axelrasmussen@google.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Hugh Dickins <hughd@google.com>, Jan Kara <jack@suse.cz>,
	 "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Matthew Wilcox <willy@infradead.org>,
	 Mike Kravetz <mike.kravetz@oracle.com>,
	Mike Rapoport <rppt@kernel.org>,
	 Muchun Song <muchun.song@linux.dev>,
	Nadav Amit <namit@vmware.com>, Peter Xu <peterx@redhat.com>,
	 Shuah Khan <shuah@kernel.org>,
	linux-fsdevel@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-mm@kvack.org,  linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 3/5] mm: userfaultfd: combine 'mode' and 'wp_copy' arguments
Date: Thu, 23 Feb 2023 09:31:26 -0800	[thread overview]
Message-ID: <CADrL8HXQTbqNAYW4h-EXe=wBmAQ15Ta1K5my9xXKPPz0vKX4XA@mail.gmail.com> (raw)
In-Reply-To: <20230223005754.2700663-4-axelrasmussen@google.com>

On Wed, Feb 22, 2023 at 4:58 PM Axel Rasmussen <axelrasmussen@google.com> wrote:
>
> Many userfaultfd ioctl functions take both a 'mode' and a 'wp_copy'
> argument. In future commits we plan to plumb the flags through to more
> places, so we'd be proliferating the very long argument list even
> further.
>
> Let's take the time to simplify the argument list. Combine the two
> arguments into one - and generalize, so when we add more flags in the
> future, it doesn't imply more function arguments.
>
> Since the modes (copy, zeropage, continue) are mutually exclusive, store
> them as an integer value (0, 1, 2) in the low bits. Place combine-able
> flag bits in the high bits.
>
> Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>

Acked-by: James Houghton <jthoughton@google.com>

I don't see anything wrong with this patch. Thanks, Axel.


  reply	other threads:[~2023-02-23 17:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23  0:57 [PATCH v2 0/5] mm: userfaultfd: refactor and add UFFDIO_CONTINUE_MODE_WP Axel Rasmussen
2023-02-23  0:57 ` [PATCH v2 1/5] mm: userfaultfd: rename functions for clarity + consistency Axel Rasmussen
2023-02-23  0:57 ` [PATCH v2 2/5] mm: userfaultfd: don't pass around both mm and vma Axel Rasmussen
2023-02-23  0:57 ` [PATCH v2 3/5] mm: userfaultfd: combine 'mode' and 'wp_copy' arguments Axel Rasmussen
2023-02-23 17:31   ` James Houghton [this message]
2023-02-23 18:51   ` Nadav Amit
2023-02-23 19:03     ` Axel Rasmussen
2023-02-23 19:08       ` Nadav Amit
2023-02-23  0:57 ` [PATCH v2 4/5] mm: userfaultfd: don't separate addr + len arguments Axel Rasmussen
2023-02-23  0:57 ` [PATCH v2 5/5] mm: userfaultfd: add UFFDIO_CONTINUE_MODE_WP to install WP PTEs 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='CADrL8HXQTbqNAYW4h-EXe=wBmAQ15Ta1K5my9xXKPPz0vKX4XA@mail.gmail.com' \
    --to=jthoughton@google.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=muchun.song@linux.dev \
    --cc=namit@vmware.com \
    --cc=peterx@redhat.com \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.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