Skip to content

mm/gup: avoid an unnecessary allocation call for FOLL_LONGTERM cases

John Hubbard linux-mm lkml oe-kbuild-all stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest1 patch 6 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1mm/gup: avoid an unnecessary allocation call for FOLL_LONGTERM casesmm/gup.c+77 -394 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchDavid HildenbrandOscar Salvador
1/1A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/1] mm/gup: avoid an unnecessary allocation call for FOLL_LONGTERM cases

This applies to today's mm-hotfixes-unstable (only). In order to test this, my earlier patch is a prequisite: commit 255231c75dcd ("mm/gup:
stop leaking pinned pages in low memory conditions").

Changes since v1 [1]:

1) Completely different implementation: instead of changing the allocator from kmalloc() to kvmalloc(), just avoid allocations entirely.

Note that David's original suggestion [2] included something that I've left out for now, mostly because it's a pre-existing question and deserves its own patch. But also, I don't understand it yet, either.

[1] https://lore.kernel.org/[email protected]

[2] https://lore.kernel.org/[email protected]

thanks,
John Hubbard

Cc David Hildenbrand <[email protected]>
Cc Vivek Kasireddy <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Peter Xu <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Dongwon Kim <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Junxiao Chang <[email protected]>
Cc Mike Kravetz <[email protected]>
Cc Oscar Salvador <[email protected]>

John Hubbard (1):
mm/gup: avoid an unnecessary allocation call for FOLL_LONGTERM cases

 mm/gup.c | 116 ++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 77 insertions(+), 39 deletions(-)

base-commit: 0012ab094cad019afcd07bdfc28e2946537e715c

Signature · 1 line
2.47.0