On Fri 05-10-18 19:49:48, [email protected] wrote: > From: John Hubbard <[email protected]> > > 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(). > > Also introduces put_user_pages(), and a few dirty/locked variations, > as a replacement for release_pages(), and also as a replacement > for open-coded loops that release multiple pages. > These may be used for subsequent performance improvements, > via batching of pages to be released. > > This prepares for eventually fixing the problem described > in [1], and is following a plan listed in [2], [3], [4]. > > [1] https://lwn.net/Articles/753027/ : "The Trouble with get_user_pages()" > > [2] https://lkml.kernel.org/r/[email protected] > Proposed steps for fixing get_user_pages() + DMA problems. > > [3]https://lkml.kernel.org/r/[email protected] > Bounce buffers (otherwise [2] is not really viable). > > [4] https://lkml.kernel.org/r/[email protected] > Follow-up discussions. > > CC: Matthew Wilcox <[email protected]> > CC: Michal Hocko <[email protected]> > CC: Christopher Lameter <[email protected]> > CC: Jason Gunthorpe <[email protected]> > CC: Dan Williams <[email protected]> > CC: Jan Kara <[email protected]> > CC: Al Viro <[email protected]> > CC: Jerome Glisse <[email protected]> > CC: Christoph Hellwig <[email protected]> > CC: Ralph Campbell <[email protected]> > Signed-off-by: John Hubbard <[email protected]> > --- > include/linux/mm.h | 48 ++++++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 46 insertions(+), 2 deletions(-)
Looks good to me. You can add: Reviewed-by: Jan Kara <[email protected]> Just one nit below: > +/* Pages that were pinned via get_user_pages*() should be released via > + * either put_user_page(), or one of the put_user_pages*() routines > + * below. > + */ Multi-line comments usually follow formatting: /* * Some text here * and more text here... */ Honza -- Jan Kara <[email protected]> SUSE Labs, CR

