From: John Hubbard <jhubbard@nvidia.com>
To: Souptick Joarder <jrdr.linux@gmail.com>,
Matthew Wilcox <willy@infradead.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
kvm@vger.kernel.org, pbonzini@redhat.com,
Linux-MM <linux-mm@kvack.org>,
Peter Zijlstra <peterz@infradead.org>,
kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org,
acme@kernel.org, Mike Rapoport <rppt@linux.ibm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
namhyung@kernel.org, Andrew Morton <akpm@linux-foundation.org>,
msuchanek@suse.de, linuxppc-dev@lists.ozlabs.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 [thread overview]
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
prev parent reply other threads:[~2020-05-23 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-23 16:41 [linux-next RFC] mm/gup.c: Convert to use get_user_pages_fast_only() 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=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=msuchanek@suse.de \
--cc=namhyung@kernel.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
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;
as well as URLs for NNTP newsgroup(s).