Skip to content

mm/ksm: improve PR_SET_MEMORY_MERGE=0 handling and cleanup disabling KSM

David Hildenbrand linux-kselftest linux-mm linux-s390 lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review 2 of 3 applied
  2. v13 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- "mm/ksm: unmerge and clear VM_MERGEABLE when setting PR_SET_MEMORY_MERGE=0"
-> Cleanup one if/else
-> Add doc for ksm_disable_merge_any()
- Added ACKs

[1] https://lkml.kernel.org/r/[email protected]

Patches in v2 2 of 3 applied

#Subject and filesSizeRepliesApplied
1/3mm/ksm: unmerge and clear VM_MERGEABLE when setting PR_SET_MEMORY_MERGE=0include/linux/ksm.h kernel/sys.c mm/ksm.c+63 -90 replies
2/3selftests/ksm: ksm_functional_tests: add prctl unmerge testtools/testing/selftests/mm/ksm_functional_tests.c+40 -60 repliesApplied
3/3mm/ksm: move disabling KSM from s390/gmap code to KSM codearch/s390/mm/gmap.c include/linux/ksm.h mm/ksm.c+18 -190 repliesApplied

Reviews trailers per patch

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

PatchStefan RoeschJanosch Frank
1/3A-b
2/3A-b
3/3A-b A-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 mm-stable v2 0/3] mm/ksm: improve PR_SET_MEMORY_MERGE=0 handling and cleanup disabling KSM

This is a follow-up to [1]:
[PATCH v9 0/3] mm: process/cgroup ksm support

which is now in mm-stable. Ideally we'd get at least patch #1 into the same kernel release as [1], so the semantics of setting PR_SET_MEMORY_MERGE=0 are unchanged between kernel versions.

(1) Make PR_SET_MEMORY_MERGE=0 unmerge pages like setting MADV_UNMERGEABLE does, (2) add a selftest for it and (3) factor out disabling of KSM from s390/gmap code.

v1 -> v2:
- "mm/ksm: unmerge and clear VM_MERGEABLE when setting PR_SET_MEMORY_MERGE=0"
-> Cleanup one if/else
-> Add doc for ksm_disable_merge_any()
- Added ACKs

[1] https://lkml.kernel.org/r/[email protected]

Cc Andrew Morton <[email protected]>
Cc Stefan Roesch <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Janosch Frank <[email protected]>
Cc Claudio Imbrenda <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Sven Schnelle <[email protected]>
Cc Shuah Khan <[email protected]>

David Hildenbrand (3):
mm/ksm: unmerge and clear VM_MERGEABLE when setting
PR_SET_MEMORY_MERGE=0
selftests/ksm: ksm_functional_tests: add prctl unmerge test mm/ksm: move disabling KSM from s390/gmap code to KSM code

 arch/s390/mm/gmap.c                           | 20 +-----
 include/linux/ksm.h                           |  7 ++
 kernel/sys.c                                  | 12 +---
 mm/ksm.c                                      | 70 +++++++++++++++++++
 .../selftests/mm/ksm_functional_tests.c       | 46 ++++++++++--
 5 files changed, 121 insertions(+), 34 deletions(-)
Signature · 1 line
2.40.0