lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bd1064bf-65ae-2c5f-0dad-b52ae12c2ece@nvidia.com>
Date:   Fri, 29 May 2020 13:28:41 -0700
From:   John Hubbard <jhubbard@...dia.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        Souptick Joarder <jrdr.linux@...il.com>
CC:     <devel@...verdev.osuosl.org>, <gregkh@...uxfoundation.org>,
        <linux-kernel@...r.kernel.org>, <rspringer@...gle.com>,
        <toddpoynor@...gle.com>
Subject: Re: [PATCH] staging: gasket: Convert get_user_pages*() -->
 pin_user_pages*()

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ