Re: [patch 004/131] mm/gup: refactor and de-duplicate gup_fast() code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-06-03 21:31, Linus Torvalds wrote:
On Wed, Jun 3, 2020 at 8:19 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

I have tried to fix it up, partly by editing the patches directly, and
partly by then trying to fix up comments after-the-fact.

The end result passes the smell test, boots for me, and looks like it
might work.

But I don't have any good real-world test for this, and I hope and
assume that John has something GPU-related that actually uses the code
and cares. Presumably there was _something_ that triggered those
changes to de-duplicate that code?


Yes: the Intel i915 driver required a pin_user_pages*() variant of the
gup fast-only code. So the next 2 patches put the refactored code into
use:

2170ecfa7688 drm/i915: convert get_user_pages() --> pin_user_pages()
104acc327648 mm/gup: introduce pin_user_pages_fast_only()



So please give it a look. Because of how I edited the patches (and
Andrew edited them before me), what is attributed to John Hubbard
isn't really the same as the patch he originally wrote.


Looking at it now. I'm pleased to see that the fix is basically identical
to a local fix that I was testing an hour ago. The only difference is
the name and type of the local fast_flags variable. An unsigned long
is larger than the API requires, but that is of course fine for now.

As for  testing, the original version of this the was part of a 4-part
series [1] that ended up converting Intel i915 to use pin_user_pages*().
And Chris Wilson (+cc) was kind enough to run some drm/i915 CI tests
on that and they passed at the time.

Also, I have a set of xfstests and a few other things exercise a fair
amount of get_user_pages*() and pin_user_pages*(). Running those now.
But my run time testing is not set up for stress testing, and it's
a very narrow look at things. But so far it looks promising.

[1] https://lore.kernel.org/r/20200522051931.54191-1-jhubbard@xxxxxxxxxx

thanks,
--
John Hubbard
NVIDIA




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux