]> git.baikalelectronics.ru Git - kernel.git/commit
mm/gup: Handle page split race more efficiently
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 7 Jan 2022 19:04:55 +0000 (14:04 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 21 Mar 2022 16:56:35 +0000 (12:56 -0400)
commite1e10bc24bd0ad4ded3f23571d3dbd08b73864e6
tree359beb8af1ae79fce424d7a2cb6be59280d700dd
parentdad2cc4fcb49c17320254e022751e74aab797cb5
mm/gup: Handle page split race more efficiently

If we hit the page split race, the current code returns NULL which will
presumably trigger a retry under the mmap_lock.  This isn't necessary;
we can just retry the compound_head() lookup.  This is a very minor
optimisation of an unlikely path, but conceptually it matches (eg)
the page cache RCU-protected lookup.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
mm/gup.c