linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] add common struct mm_slot and use it in THP and KSM
@ 2022-08-31  3:19 Qi Zheng
  2022-08-31  3:19 ` [PATCH v2 1/7] mm: introduce common struct mm_slot Qi Zheng
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Qi Zheng @ 2022-08-31  3:19 UTC (permalink / raw)
  To: akpm, shy828301, willy, vbabka, hannes, minchan, rppt
  Cc: linux-mm, linux-kernel, Qi Zheng

Hi all,

At present, both THP and KSM module have similar structures mm_slot for
organizing and recording the information required for scanning mm, and
each defines the following exactly the same operation functions:

 - alloc_mm_slot
 - free_mm_slot
 - get_mm_slot
 - insert_to_mm_slots_hash

In order to de-duplicate these codes, this patchset introduces a common
struct mm_slot, and lets THP and KSM to use it.

This series is based on next-20220829.

Comments and suggestions are welcome.

Thanks,
Qi.

Changelog in v1 -> v2:
 - change the names of these mm_slot related operation functions
   (suggested by Andrew)

Qi Zheng (7):
  mm: introduce common struct mm_slot
  mm: thp: convert to use common struct mm_slot
  ksm: remove redundant declarations in ksm.h
  ksm: add the ksm prefix to the names of the ksm private structures
  ksm: convert ksm_mm_slot.mm_list to ksm_mm_slot.mm_node
  ksm: convert ksm_mm_slot.link to ksm_mm_slot.hash
  ksm: convert to use common struct mm_slot

 Documentation/mm/ksm.rst |   2 +-
 include/linux/ksm.h      |   3 -
 mm/khugepaged.c          | 121 ++++++---------
 mm/ksm.c                 | 326 ++++++++++++++++++---------------------
 mm/mm_slot.h             |  55 +++++++
 5 files changed, 260 insertions(+), 247 deletions(-)
 create mode 100644 mm/mm_slot.h

-- 
2.20.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-09-01  7:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31  3:19 [PATCH v2 0/7] add common struct mm_slot and use it in THP and KSM Qi Zheng
2022-08-31  3:19 ` [PATCH v2 1/7] mm: introduce common struct mm_slot Qi Zheng
2022-08-31  3:19 ` [PATCH v2 2/7] mm: thp: convert to use " Qi Zheng
2022-09-01  7:44   ` [PATCH mm-unstable] mm: thp: fix build error with CONFIG_SHMEM disabled Qi Zheng
2022-08-31  3:19 ` [PATCH v2 3/7] ksm: remove redundant declarations in ksm.h Qi Zheng
2022-08-31  3:19 ` [PATCH v2 4/7] ksm: add the ksm prefix to the names of the ksm private structures Qi Zheng
2022-08-31  3:19 ` [PATCH v2 5/7] ksm: convert ksm_mm_slot.mm_list to ksm_mm_slot.mm_node Qi Zheng
2022-08-31  3:19 ` [PATCH v2 6/7] ksm: convert ksm_mm_slot.link to ksm_mm_slot.hash Qi Zheng
2022-08-31  3:19 ` [PATCH v2 7/7] ksm: convert to use common struct mm_slot Qi Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox