Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Souptick Joarder <jrdr.linux@gmail.com>,
	Matthew Wilcox <willy@infradead.org>
Cc: Paul Mackerras <paulus@ozlabs.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	<namhyung@kernel.org>, <pbonzini@redhat.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Mike Rapoport <rppt@linux.ibm.com>, <msuchanek@suse.de>,
	Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>,
	<kvm-ppc@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>,
	<linux-kernel@vger.kernel.org>, Linux-MM <linux-mm@kvack.org>,
	<kvm@vger.kernel.org>
Subject: Re: [linux-next RFC] mm/gup.c: Convert to use get_user_pages_fast_only()
Date: Sat, 23 May 2020 15:18:41 -0700
Message-ID: <cf449b49-d0c0-ecc7-6d7e-49839e39a0e9@nvidia.com> (raw)
In-Reply-To: <CAFqt6zZfrdRB5pbHo5nu668yQUaTV9DbV3ZTeFq-UEKjs0X8XQ@mail.gmail.com>

On 2020-05-23 12:35, Souptick Joarder wrote:
...
>> Everything you have done here is an improvement, and I'd be happy to
>> see it go in (after fixing the bug I note below).
>>
>> But in reading through it, I noticed almost every user ...
>>
>>> -     if (__get_user_pages_fast(hva, 1, 1, &page) == 1) {
>>> +     if (get_user_pages_fast_only(hva, 1, FOLL_WRITE, &page) == 1) {
>>
>> passes '1' as the second parameter.  So do we want to add:
>>
>> static inline bool get_user_page_fast_only(unsigned long addr,
>>                  unsigned int gup_flags, struct page **pagep)
>> {
>>          return get_user_pages_fast_only(addr, 1, gup_flags, pagep) == 1;
>> }
>>
> Yes, this can be added. Does get_user_page_fast_only() naming is fine ?


It seems like a good name to me. And I think that the new wrapper call is
a good move, too.

I did pause and reflect for a moment about the number gup/pup API calls we
are building up, but that's merely an indication of the wide usage of this
functionality. So it all feels about right.


thanks,
-- 
John Hubbard
NVIDIA


      reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23 16:41 Souptick Joarder
2020-05-23 17:25 ` Matthew Wilcox
2020-05-23 19:35   ` Souptick Joarder
2020-05-23 22:18     ` John Hubbard [this message]

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=cf449b49-d0c0-ecc7-6d7e-49839e39a0e9@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=acme@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=jrdr.linux@gmail.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=msuchanek@suse.de \
    --cc=namhyung@kernel.org \
    --cc=paulus@ozlabs.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rppt@linux.ibm.com \
    --cc=sfr@canb.auug.org.au \
    --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

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git