mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 12:44:10 +00:00
mm: sysctl: fix missing numa_stat when !CONFIG_HUGETLB_PAGE
[ Upstream commit43b5240ca6
] "numa_stat" should not be included in the scope of CONFIG_HUGETLB_PAGE, if CONFIG_HUGETLB_PAGE is not configured even if CONFIG_NUMA is configured, "numa_stat" is missed form /proc. Move it out of CONFIG_HUGETLB_PAGE to fix it. Fixes:4518085e12
("mm, sysctl: make NUMA stats configurable") Signed-off-by: Muchun Song <songmuchun@bytedance.com> Cc: <stable@vger.kernel.org> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9481eae492
commit
8d9eaab2bc
1 changed files with 11 additions and 9 deletions
|
@ -2852,6 +2852,17 @@ static struct ctl_table vm_table[] = {
|
|||
.extra1 = SYSCTL_ZERO,
|
||||
.extra2 = &two_hundred,
|
||||
},
|
||||
#ifdef CONFIG_NUMA
|
||||
{
|
||||
.procname = "numa_stat",
|
||||
.data = &sysctl_vm_numa_stat,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = sysctl_vm_numa_stat_handler,
|
||||
.extra1 = SYSCTL_ZERO,
|
||||
.extra2 = SYSCTL_ONE,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
{
|
||||
.procname = "nr_hugepages",
|
||||
|
@ -2868,15 +2879,6 @@ static struct ctl_table vm_table[] = {
|
|||
.mode = 0644,
|
||||
.proc_handler = &hugetlb_mempolicy_sysctl_handler,
|
||||
},
|
||||
{
|
||||
.procname = "numa_stat",
|
||||
.data = &sysctl_vm_numa_stat,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = sysctl_vm_numa_stat_handler,
|
||||
.extra1 = SYSCTL_ZERO,
|
||||
.extra2 = SYSCTL_ONE,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.procname = "hugetlb_shm_group",
|
||||
|
|
Loading…
Add table
Reference in a new issue