Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-25 Thread Jason Gunthorpe
On Sun, Nov 24, 2019 at 04:05:16PM -0800, John Hubbard wrote: > I looked into this, and I believe that the problem is in gup.c. There appears > to > have been an oversight, in commit 817be129e6f2 ("mm: validate > get_user_pages_fast > flags"), in filtering out FOLL_FORCE. There is nothing in th

Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-24 Thread John Hubbard
On 11/24/19 2:07 AM, Leon Romanovsky wrote: > On Thu, Nov 21, 2019 at 10:36:43AM -0400, Jason Gunthorpe wrote: >> On Thu, Nov 21, 2019 at 12:07:46AM -0800, Christoph Hellwig wrote: >>> On Wed, Nov 20, 2019 at 11:13:37PM -0800, John Hubbard wrote: And get rid of the mmap_sem calls, as part of t

Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-24 Thread Leon Romanovsky
On Thu, Nov 21, 2019 at 10:36:43AM -0400, Jason Gunthorpe wrote: > On Thu, Nov 21, 2019 at 12:07:46AM -0800, Christoph Hellwig wrote: > > On Wed, Nov 20, 2019 at 11:13:37PM -0800, John Hubbard wrote: > > > And get rid of the mmap_sem calls, as part of that. Note > > > that get_user_pages_fast() wil

Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-23 Thread John Hubbard
On 11/21/19 6:36 AM, Jason Gunthorpe wrote: > On Thu, Nov 21, 2019 at 12:07:46AM -0800, Christoph Hellwig wrote: >> On Wed, Nov 20, 2019 at 11:13:37PM -0800, John Hubbard wrote: >>> And get rid of the mmap_sem calls, as part of that. Note >>> that get_user_pages_fast() will, if necessary, fall back

Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-22 Thread Jason Gunthorpe
On Thu, Nov 21, 2019 at 12:07:46AM -0800, Christoph Hellwig wrote: > On Wed, Nov 20, 2019 at 11:13:37PM -0800, John Hubbard wrote: > > And get rid of the mmap_sem calls, as part of that. Note > > that get_user_pages_fast() will, if necessary, fall back to > > __gup_longterm_unlocked(), which takes

[PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-20 Thread John Hubbard
And get rid of the mmap_sem calls, as part of that. Note that get_user_pages_fast() will, if necessary, fall back to __gup_longterm_unlocked(), which takes the mmap_sem as needed. Reviewed-by: Jan Kara Reviewed-by: Jason Gunthorpe Reviewed-by: Ira Weiny Signed-off-by: John Hubbard --- drivers