mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Souptick Joarder <jrdr.linux@gmail.com>
Cc: <devel@driverdev.osuosl.org>, <gregkh@linuxfoundation.org>,
	<linux-kernel@vger.kernel.org>, <rspringer@google.com>,
	<toddpoynor@google.com>
Subject: Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()
Date: Fri, 29 May 2020 13:28:41 -0700	[thread overview]
Message-ID: <bd1064bf-65ae-2c5f-0dad-b52ae12c2ece@nvidia.com> (raw)
In-Reply-To: <20200529115330.GO30374@kadam>

On 2020-05-29 04:53, Dan Carpenter wrote:
...
> What are the runtime implications of this patch?  I'm still not clear on
> that honestly.

Instead of incrementing each page's refcount by 1 (with get_user_pages()),
pin_user_pages*() will increment by GUP_PIN_COUNTING_BIAS, which is 1024.
That by itself should not have any performance impact, of course, but
there's a couple more things:

For compound pages of more than 2 page size, it will also increment
a separate struct page's field, via hpage_pincount_add().

And finally, it will update /proc/vmstat counters on pin and unpin, via
the optimized mod_node_page_state() call.

So it's expected to be very light. And, for DMA (as opposed to DIO)
situations, the DMA setup time is inevitably much greater than any of
the above overheads, so I expect that this patch will be completely
invisible from a performance point of view.

It would be a "nice to have", though, if anyone were able to do a
performance comparison on the gasket driver for this patch, and/or
basic runtime verification, since I'm sure it's a specialized setup.


thanks,
-- 
John Hubbard
NVIDIA

  reply	other threads:[~2020-05-29 20:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 21:02 Souptick Joarder
2020-05-28 11:04 ` Dan Carpenter
2020-05-29  6:16   ` Souptick Joarder
2020-05-29  6:27     ` Souptick Joarder
2020-05-29  7:38       ` John Hubbard
2020-05-29  7:45         ` Dan Carpenter
2020-05-29  7:46       ` Dan Carpenter
2020-05-29  8:00         ` John Hubbard
2020-05-29 11:53   ` Dan Carpenter
2020-05-29 20:28     ` John Hubbard [this message]
2020-05-31  7:23 Souptick Joarder
2020-05-31  8:59 ` Dan Carpenter

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=bd1064bf-65ae-2c5f-0dad-b52ae12c2ece@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rspringer@google.com \
    --cc=toddpoynor@google.com \
    /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

Powered by JetHome