Skip to content

mm/hugetlb: refactor sysfs/sysctl interfaces

Hui Zhu linux-mm lkml 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 0 repliesNew 1 of 2 applied
  2. v42 patches 2 repliesSuperseded
  3. v32 patches 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches0 repliesSuperseded
v12 patches5 repliesSuperseded

Changes in v5 from the cover letter

According to the comments of David Hildenbrand and Oscar Salvador, move demote_free_hugetlb_folios and demote_pool_huge_page back to hugetlb.c.

Patches in v5 1 of 2 applied

#Subject and filesSizeRepliesApplied
1/2mm/hugetlb: extract sysfs into hugetlb_sysfs.cMAINTAINERS mm/Makefile mm/hugetlb.c +2 more+626 -5860 replies
2/2mm/hugetlb: extract sysctl into hugetlb_sysctl.cMAINTAINERS mm/Makefile mm/hugetlb.c +2 more+142 -1330 repliesApplied

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCH v5 0/2] mm/hugetlb: refactor sysfs/sysctl interfaces

From: Hui Zhu <[email protected]>

The hugetlb.c file has grown significantly and become difficult to maintain. This patch series extracts the sysfs and sysctl interface code into separate dedicated files to improve code organization.

The refactoring includes:
- Patch 1: Extract sysfs interface into mm/hugetlb_sysfs.c
- Patch 2: Extract sysctl interface into mm/hugetlb_sysctl.c

No functional changes are introduced in this series. The code is moved as-is, with only minor formatting adjustments for code style consistency. This should make future maintenance and enhancements to the hugetlb subsystem easier.

Testing: The patch series has been compile-tested and maintains the same functionality as the original code.

Changelog:
v5:
According to the comments of David Hildenbrand and Oscar Salvador, move demote_free_hugetlb_folios and demote_pool_huge_page back to hugetlb.c.
v4:
According to the comments of David Hildenbrand, add copyright of hugetlb.c to hugetlb_internal.h, hugetlb_sysctl.c and hugetlb_sysfs.c. v3:
According to the comments of SeongJae Park, updated MAINTAINERS to add new files.
Removed the wrong copyright in hugetlb_internal.h.
v2:
According to the comments of David Hildenbrand, removed the wrong copyright in the file headers.

Hui Zhu (2):
mm/hugetlb: extract sysfs into hugetlb_sysfs.c mm/hugetlb: extract sysctl into hugetlb_sysctl.c

 MAINTAINERS           |   2 +
 mm/Makefile           |   2 +-
 mm/hugetlb.c          | 728 +-----------------------------------------
 mm/hugetlb_internal.h | 117 +++++++
 mm/hugetlb_sysctl.c   | 134 ++++++++
 mm/hugetlb_sysfs.c    | 502 +++++++++++++++++++++++++++++
 6 files changed, 767 insertions(+), 718 deletions(-)
 create mode 100644 mm/hugetlb_internal.h
 create mode 100644 mm/hugetlb_sysctl.c
 create mode 100644 mm/hugetlb_sysfs.c
Signature · 1 line
2.43.0