Skip to content

A few gup refactorings and documentation updates

John Hubbard linux-fsdevel linux-mm linux-s390 lkml 3 versions – Applied

Status from this message: [merged] mm-gup-remove-try_get_page-call-try_get_compound_head-directly.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesApplied 3/3
  2. v23 patches 7 repliesSuperseded
  3. v13 patches 7 repliesSuperseded

Changes in v2 from the cover letter

* Changed refs to @refs, and added some more documentation as well.
* Completely removed try_get_page(). (I'm adding more people and lists to Cc, because of those call site changes.) * Reversed the logic in
try_grab_page() to make it a touch more
readable.
* Rebased to linux-next (next-20210810).

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3mm/gup: documentation corrections for gup/pupmm/gup.c+20 -70 repliesApplied
2/3mm/gup: small refactoring: simplify try_grab_page()include/linux/mm.h mm/gup.c+7 -320 repliesApplied
3/3mm/gup: Remove try_get_page(), call try_get_compound_head() directlyarch/s390/mm/fault.c fs/pipe.c include/linux/mm.h +1 more+20 -150 repliesApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchChristoph Hellwig
1/3
2/3R-b
3/3R-b

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

Read the v3 thread

Cover letter [PATCH v3 0/3] A few gup refactorings and documentation updates

Here is what's new for v3:

* Removed __maybe_unused from try_grab_compound_head
* Removed some unnecessary comparisons against NULL.
* Added Christoph's Reviewed-by tags to patches 2 and 3

Changes in v2:

* Changed refs to @refs, and added some more documentation as well.
* Completely removed try_get_page(). (I'm adding more people and lists to Cc, because of those call site changes.) * Reversed the logic in
try_grab_page() to make it a touch more
readable.
* Rebased to linux-next (next-20210810).

Original v2 is here:
https://lore.kernel.org/r/[email protected]

Here is the v1 cover letter, edited slightly to keep up with the latest story.

While reviewing some of the other things going on around gup.c, I noticed that the documentation was wrong for a few of the routines that I wrote. And then I noticed that there was some significant code duplication too. So this fixes those issues.

This is not entirely risk-free, but after looking closely at this, I think it's actually a useful improvement, getting rid of the code duplication here.

However, it is possible I've overlooked something. I did some local LTP and other testing on an x86 test machine but failed to find any problems yet.

Original v1 is here:
https://lore.kernel.org/r/[email protected]

John Hubbard (3):
mm/gup: documentation corrections for gup/pup
mm/gup: small refactoring: simplify try_grab_page() mm/gup: Remove try_get_page(), call try_get_compound_head() directly

 arch/s390/mm/fault.c |  2 +-
 fs/pipe.c            |  2 +-
 include/linux/mm.h   | 14 ++------
 mm/gup.c             | 83 ++++++++++++++++++++++----------------------
 4 files changed, 47 insertions(+), 54 deletions(-)
Signature · 1 line
2.32.0