mm: hugetlb: move hugeltb sysctls to its own file
Subsystems (4)
PATCH v2 1/1 mm: hugetlb: move hugeltb sysctls to its own file
This moves all hugetlb sysctls to its own file, also kill an useless hugetlb_treat_movable_handler() since commit d6cb41cc44c6 ("mm, hugetlb: remove hugepages_treat_as_movable sysctl").
Signed-off-by Kefeng Wang <[email protected]>
Reviewed-by Luis Chamberlain <[email protected]>
Reviewed-by Mike Kravetz <[email protected]>
Reviewed-by Muchun Song <[email protected]>
---
v2:
- add __init to hugetlb_sysfs_init
- update commit and add RBs
include/linux/hugetlb.h | 8 ------- kernel/sysctl.c | 32 -------------------------- mm/hugetlb.c | 51 ++++++++++++++++++++++++++++++++++++++--- 3 files changed, 48 insertions(+), 43 deletions(-)
include/linux/hugetlb.h +0 -8
@@ -124,14 +124,6 @@ void hugepage_put_subpool(struct hugepage_subpool *spool);void hugetlb_dup_vma_private (struct vm_area_struct *vma);void clear_vma_resv_huge_pages (struct vm_area_struct *vma); -int hugetlb_sysctl_handler (struct ctl_table *,int ,void *,size_t *,loff_t *); -int hugetlb_overcommit_handler (struct ctl_table *,int ,void *,size_t *, -loff_t *); -int hugetlb_treat_movable_handler (struct ctl_table *,int ,void *,size_t *, -loff_t *); -int hugetlb_mempolicy_sysctl_handler (struct ctl_table *,int ,void *,size_t *, -loff_t *); - int move_hugetlb_page_tables(struct vm_area_struct *vma, struct vm_area_struct *new_vma, unsigned long old_addr, unsigned long new_addr,
kernel/sysctl.c +0 -32
@@ -2140,38 +2140,6 @@ static struct ctl_table vm_table[] = { .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE, }, -#endif -#ifdef CONFIG_HUGETLB_PAGE - { - .procname = "nr_hugepages", - .data = NULL, - .maxlen = sizeof(unsigned long), - .mode = 0644, - .proc_handler = hugetlb_sysctl_handler, - }, -#ifdef CONFIG_NUMA - { - .procname = "nr_hugepages_mempolicy", - .data = NULL, - .maxlen = sizeof(unsigned long), - .mode = 0644, - .proc_handler = &hugetlb_mempolicy_sysctl_handler, - }, -#endif - { - .procname = "hugetlb_shm_group", - .data = &sysctl_hugetlb_shm_group, - .maxlen = sizeof(gid_t), - .mode = 0644, - .proc_handler = proc_dointvec, - }, - { - .procname = "nr_overcommit_hugepages", - .data = NULL, - .maxlen = sizeof(unsigned long), - .mode = 0644, - .proc_handler = hugetlb_overcommit_handler, - },#endif { .procname = "lowmem_reserve_ratio",
mm/hugetlb.c +48 -3
87 lines not on this page · raw message
Signature · 1 line
2.35.3
Quoted 8 lines · Kefeng Wang
This moves all hugetlb sysctls to its own file, also kill an useless
hugetlb_treat_movable_handler()since commitd6cb41cc44c6("mm, hugetlb: removehugepages_treat_as_movablesysctl").Signed-off-by Kefeng Wang <[email protected]>Reviewed-by Luis Chamberlain <[email protected]>Reviewed-by Mike Kravetz <[email protected]>Reviewed-by Muchun Song <[email protected]>
Thanks queued up onto sysctl-testing [0]. Eventually I'll move this to sysctl-next.
[0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/log/?h=sysctl-testing
Luis