Skip to content

RFC mm: pagewalk: Rework callback return values and optionally skip the pte level

Thomas Hellström (VMware) linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mm: Have the mempolicy pagewalk to avoid positive callback return codesmm/mempolicy.c+8 -81 reply
2/4fs: task_mmu: Have the pagewalk avoid positive callback return codesfs/proc/task_mmu.c+1 -10 replies
3/4mm: pagewalk: Disallow user positive callback return values and use them for walk controlinclude/linux/pagewalk.h mm/pagewalk.c+12 -30 replies
4/4mm: mapping_dirty_helpers: Handle huge pmds correctlymm/mapping_dirty_helpers.c+10 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/4] mm: pagewalk: Rework callback return values and optionally skip the pte level

This series converts all users of pagewalk positive callback return values to use negative values instead, so that the positive values are free for pagewalk control. Then the return value PAGE_WALK_CONTINUE is introduced. That value is intended for callbacks to indicate that they've handled the entry and it's not necessary to split and go to a lower level. Initially this is implemented only for pmd_entry(), but could (should?) at some point be used also for pud_entry().

Finally the mapping_dirty_helpers pagewalk is modified to use the new value indicating that it has processed a read-only huge pmd entry and don't want it to be split and handled at the pte level.

Note: This series still needs some significant testing and another re-audit to verify that there are no more pagewalk users relying on positive return values.