linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pingfan Liu <kernelfans@gmail.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: linux-mm <linux-mm@kvack.org>, Ira Weiny <ira.weiny@intel.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Mike Rapoport <rppt@linux.ibm.com>,
	 Dan Williams <dan.j.williams@intel.com>,
	Matthew Wilcox <willy@infradead.org>,
	 John Hubbard <jhubbard@nvidia.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	 Keith Busch <keith.busch@intel.com>,
	Christoph Hellwig <hch@infradead.org>,
	Shuah Khan <shuah@kernel.org>,
	 LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv5 3/3] mm/gup_benchemark: add LONGTERM_BENCHMARK test in gup fast path
Date: Mon, 2 Mar 2020 10:38:27 +0800	[thread overview]
Message-ID: <CAFgQCTtQL7Dub8csVn-EDs8EBtsSSjsRobJLnXrrosTDnZhj4w@mail.gmail.com> (raw)
In-Reply-To: <CAKgT0Uc5cqJ5yhdi7HkyFTuiYQiPt9rGFPd42qAGSa7+d9ZQgQ@mail.gmail.com>

On Fri, Feb 28, 2020 at 11:43 PM Alexander Duyck
<alexander.duyck@gmail.com> wrote:
>
> On Fri, Feb 28, 2020 at 3:35 AM Pingfan Liu <kernelfans@gmail.com> wrote:
> >
> > Introduce a GUP_LONGTERM_BENCHMARK ioctl to test longterm pin in gup fast
> > path.
>
> The title of the patch has a typo in it. There is only one 'e' in "benchmark".
Yes, it should be GUP_FAST_LONGTERM_BENCHMARK
>
> > Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> > Cc: Ira Weiny <ira.weiny@intel.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Mike Rapoport <rppt@linux.ibm.com>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Cc: Matthew Wilcox <willy@infradead.org>
> > Cc: John Hubbard <jhubbard@nvidia.com>
> > Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
> > Cc: Keith Busch <keith.busch@intel.com>
> > Cc: Christoph Hellwig <hch@infradead.org>
> > Cc: Shuah Khan <shuah@kernel.org>
> > To: linux-mm@kvack.org
> > Cc: linux-kernel@vger.kernel.org
> > ---
> >  mm/gup_benchmark.c                         | 7 +++++++
> >  tools/testing/selftests/vm/gup_benchmark.c | 6 +++++-
> >  2 files changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/mm/gup_benchmark.c b/mm/gup_benchmark.c
> > index 8dba38e..bf61e7a 100644
> > --- a/mm/gup_benchmark.c
> > +++ b/mm/gup_benchmark.c
> > @@ -8,6 +8,7 @@
> >  #define GUP_FAST_BENCHMARK     _IOWR('g', 1, struct gup_benchmark)
> >  #define GUP_LONGTERM_BENCHMARK _IOWR('g', 2, struct gup_benchmark)
> >  #define GUP_BENCHMARK          _IOWR('g', 3, struct gup_benchmark)
> > +#define GUP_FAST_LONGTERM_BENCHMARK    _IOWR('g', 4, struct gup_benchmark)
> >
> >  struct gup_benchmark {
> >         __u64 get_delta_usec;
> > @@ -57,6 +58,11 @@ static int __gup_benchmark_ioctl(unsigned int cmd,
> >                         nr = get_user_pages_fast(addr, nr, gup->flags,
> >                                                  pages + i);
> >                         break;
> > +               case GUP_FAST_LONGTERM_BENCHMARK:
> > +                       nr = get_user_pages_fast(addr, nr,
> > +                                       (gup->flags & 1) | FOLL_LONGTERM,
> > +                                        pages + i);
> > +                       break;
>
> If I am not mistaken the mask of gup->flags is redundant. It is
> already masked by FOLL_WRITE several lines before this switch
> statement.
Yes, you are right. Thanks for your kind review.

Regards,
Pingfan


  reply	other threads:[~2020-03-02  2:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 11:32 [PATCHv5 0/3] fix omission of check on FOLL_LONGTERM in gup fast path Pingfan Liu
2020-02-28 11:32 ` [PATCHv5 1/3] mm/gup: rename nr as nr_pinned in internal_get_user_pages_fast() Pingfan Liu
2020-02-28 11:32 ` [PATCHv5 2/3] mm/gup: fix omission of check on FOLL_LONGTERM in gup fast path Pingfan Liu
2020-02-28 13:44   ` Jason Gunthorpe
2020-03-02  2:25     ` Pingfan Liu
2020-03-02 13:08       ` Jason Gunthorpe
2020-03-03 13:39         ` Pingfan Liu
2020-02-28 22:34   ` Ira Weiny
2020-03-02  2:28     ` Pingfan Liu
2020-03-02 23:51   ` John Hubbard
2020-03-03 13:38     ` Pingfan Liu
2020-02-28 11:32 ` [PATCHv5 3/3] mm/gup_benchemark: add LONGTERM_BENCHMARK test " Pingfan Liu
2020-02-28 15:43   ` Alexander Duyck
2020-03-02  2:38     ` Pingfan Liu [this message]
2020-03-02 23:42 ` [PATCHv5 0/3] fix omission of check on FOLL_LONGTERM " John Hubbard

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=CAFgQCTtQL7Dub8csVn-EDs8EBtsSSjsRobJLnXrrosTDnZhj4w@mail.gmail.com \
    --to=kernelfans@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.duyck@gmail.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=dan.j.williams@intel.com \
    --cc=hch@infradead.org \
    --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=shuah@kernel.org \
    --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).