Re: [PATCH v3 1/1] mm: introduce put_user_page*(), placeholder versions

From: John Hubbard
Date: Wed Mar 13 2019 - 23:19:34 EST


On 3/13/19 7:49 AM, Ira Weiny wrote:
On Tue, Mar 12, 2019 at 05:38:55PM -0700, John Hubbard wrote:
On 3/12/19 8:30 AM, Ira Weiny wrote:
On Wed, Mar 06, 2019 at 03:54:55PM -0800, john.hubbard@xxxxxxxxx wrote:
From: John Hubbard <jhubbard@xxxxxxxxxx>

Introduces put_user_page(), which simply calls put_page().
This provides a way to update all get_user_pages*() callers,
so that they call put_user_page(), instead of put_page().

So I've been running with these patches for a while but today while ramping up
my testing I hit the following:

[ 1355.557819] ------------[ cut here ]------------
[ 1355.563436] get_user_pages pin count overflowed

Hi Ira,

Thanks for reporting this. That overflow, at face value, means that we've
used more than the 22 bits worth of gup pin counts, so about 4 million pins
of the same page...

This is my bug in the patches I'm playing with. Somehow I'm causing more puts
than gets... I'm not sure how but this is for sure my problem.

Backing off to your patch set the numbers are good.

Now that's a welcome bit of good news!


Sorry for the noise.

With the testing I've done today I feel comfortable adding

Tested-by: Ira Weiny <ira.weiny@xxxxxxxxx>

For the main GUP and InfiniBand patches.

Ira


OK, I'll add your tested-by tag to patches 1, 2, 4, 5 (the numbering refers
to the "RFC v2: mm: gup/dma tracking" posting [1]) in my repo [2], and they'll show up in the next posting. (Patch 3 is already upstream, and patch 6 is
documentation that needs to be rewritten entirely.)

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

[2] https://github.com/johnhubbard/linux/tree/gup_dma_core

thanks,
--
John Hubbard
NVIDIA