Skip to content

mm: introduce pmd|pte_needs_soft_dirty_wp helpers and utilize them

Barry Song linux-mm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review 1 of 2 applied
  2. v11 patch 2 repliesSuperseded

Patches in v2 1 of 2 applied

#Subject and filesSizeRepliesApplied
1/2mm: introduce pmd|pte_needs_soft_dirty_wp helpers for softdirty write-protectmm/gup.c mm/huge_memory.c mm/internal.h +1 more+14 -41 reply
2/2mm: set pte writable while pte_soft_dirty() is true in do_swap_page()mm/memory.c+1 -11 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDavid Hildenbrand
1/2A-b
2/2A-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/2] mm: introduce pmd|pte_needs_soft_dirty_wp helpers and utilize them

From: Barry Song <[email protected]>

This patchset introduces the pte_need_soft_dirty_wp and pmd_need_soft_dirty_wp helpers to determine if write protection is required for softdirty tracking. These helpers enhance code readability and improve the overall appearance.

They are then utilized in gup, mprotect, swap, and other related functions.

-v2:
* rename "need" to "needs" per David;
* separate the change of do_swap_page() per david;

Thanks to David for his original suggestions on this[1].
[1] https://lore.kernel.org/linux-mm/[email protected]/

Barry Song (2):
mm: introduce pmd|pte_needs_soft_dirty_wp helpers for softdirty
write-protect
mm: set pte writable while pmd_soft_dirty() is true in do_swap_page()

 mm/gup.c         |  4 ++--
 mm/huge_memory.c |  2 +-
 mm/internal.h    | 10 ++++++++++
 mm/memory.c      |  2 +-
 mm/mprotect.c    |  2 +-
 5 files changed, 15 insertions(+), 5 deletions(-)
Signature · 1 line
2.34.1