From: Pingfan Liu <kernelfans@gmail.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: John Hubbard <jhubbard@nvidia.com>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@linux.ibm.com>,
Dan Williams <dan.j.williams@intel.com>,
Matthew Wilcox <willy@infradead.org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
Keith Busch <keith.busch@intel.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/gup: fix omission of check on FOLL_LONGTERM in get_user_pages_fast()
Date: Fri, 31 May 2019 18:40:57 +0800 [thread overview]
Message-ID: <CAFgQCTtFmK1=7a4ewb+Dy3JZk=rxthi6ZAJBkkMaTgW2DxtubA@mail.gmail.com> (raw)
In-Reply-To: <20190530235307.GA28605@iweiny-DESK2.sc.intel.com>
On Fri, May 31, 2019 at 7:52 AM Ira Weiny <ira.weiny@intel.com> wrote:
>
> On Thu, May 30, 2019 at 04:21:19PM -0700, John Hubbard wrote:
> > On 5/30/19 2:47 PM, Ira Weiny wrote:
> > > On Thu, May 30, 2019 at 06:54:04AM +0800, Pingfan Liu wrote:
> > [...]
> > >> + for (j = i; j < nr; j++)
> > >> + put_page(pages[j]);
> > >
> > > Should be put_user_page() now. For now that just calls put_page() but it is
> > > slated to change soon.
> > >
> > > I also wonder if this would be more efficient as a check as we are walking the
> > > page tables and bail early.
> > >
> > > Perhaps the code complexity is not worth it?
> >
> > Good point, it might be worth it. Because now we've got two loops that
> > we run, after the interrupts-off page walk, and it's starting to look like
> > a potential performance concern.
>
> FWIW I don't see this being a huge issue at the moment. Perhaps those more
> familiar with CMA can weigh in here. How was this issue found? If it was
> found by running some test perhaps that indicates a performance preference?
>
I found the bug by reading code. And I do not see any performance
concern. Bailing out early contritute little to performance, as we
fall on the slow path immediately.
Regards,
Pingfan
[....]
next prev parent reply other threads:[~2019-05-31 10:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 22:54 Pingfan Liu
2019-05-30 21:47 ` Ira Weiny
2019-05-30 23:21 ` John Hubbard
2019-05-30 23:53 ` Ira Weiny
2019-05-31 10:40 ` Pingfan Liu [this message]
2019-05-31 11:05 ` Pingfan Liu
2019-05-31 17:05 ` John Hubbard
2019-06-03 4:06 ` Pingfan Liu
2019-05-31 17:13 ` Ira Weiny
2019-06-03 4:05 ` Pingfan Liu
2019-05-31 10:29 ` Pingfan Liu
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='CAFgQCTtFmK1=7a4ewb+Dy3JZk=rxthi6ZAJBkkMaTgW2DxtubA@mail.gmail.com' \
--to=kernelfans@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=ira.weiny@intel.com \
--cc=jhubbard@nvidia.com \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rppt@linux.ibm.com \
--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