From: Jason Gunthorpe Subject: Re: [PATCH v5 12/24] IB/{core,hw,umem}: set FOLL_PIN via pin_user_pages*(), fix up ODP Date: Fri, 15 Nov 2019 10:09:27 -0400 Message-ID: <20191115140927.GB4055@ziepe.ca> References: <20191115055340.1825745-1-jhubbard@nvidia.com> <20191115055340.1825745-13-jhubbard@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20191115055340.1825745-13-jhubbard@nvidia.com> Sender: linux-kernel-owner@vger.kernel.org To: John Hubbard Cc: Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Ira Weiny , Jan Kara , Jens Axboe , Jonathan Corbet , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman List-Id: dri-devel@lists.freedesktop.org On Thu, Nov 14, 2019 at 09:53:28PM -0800, John Hubbard wrote: > Convert infiniband to use the new pin_user_pages*() calls. > > Also, revert earlier changes to Infiniband ODP that had it using > put_user_page(). ODP is "Case 3" in > Documentation/core-api/pin_user_pages.rst, which is to say, normal > get_user_pages() and put_page() is the API to use there. > > The new pin_user_pages*() calls replace corresponding get_user_pages*() > calls, and set the FOLL_PIN flag. The FOLL_PIN flag requires that the > caller must return the pages via put_user_page*() calls, but infiniband > was already doing that as part of an earlier commit. > > Signed-off-by: John Hubbard > --- > drivers/infiniband/core/umem.c | 2 +- > drivers/infiniband/core/umem_odp.c | 13 ++++++------- > drivers/infiniband/hw/hfi1/user_pages.c | 2 +- > drivers/infiniband/hw/mthca/mthca_memfree.c | 2 +- > drivers/infiniband/hw/qib/qib_user_pages.c | 2 +- > drivers/infiniband/hw/qib/qib_user_sdma.c | 2 +- > drivers/infiniband/hw/usnic/usnic_uiom.c | 2 +- > drivers/infiniband/sw/siw/siw_mem.c | 2 +- > 8 files changed, 13 insertions(+), 14 deletions(-) Ok Reviewed-by: Jason Gunthorpe Jason