Revert "hugetlb: Add hugetlb_dynamic_pool sysctl"

This reverts commit 54f9f80d6543fb7b157d3b11e2e7911dc1379790 ("hugetlb:
Add hugetlb_dynamic_pool sysctl")

Given the new sysctl nr_overcommit_hugepages, the boolean dynamic pool
sysctl is not needed, as its semantics can be expressed by 0 in the
overcommit sysctl (no dynamic pool) and non-0 in the overcommit sysctl
(pool enabled).

(Needed in 2.6.24 since it reverts a post-2.6.23 userspace-visible change)

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Adam Litke <agl@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Nishanth Aravamudan and committed by Linus Torvalds 368d2c63 d1c3fb1f

-14
-1
include/linux/hugetlb.h
··· 33 33 34 34 extern unsigned long max_huge_pages; 35 35 extern unsigned long hugepages_treat_as_movable; 36 - extern int hugetlb_dynamic_pool; 37 36 extern unsigned long nr_overcommit_huge_pages; 38 37 extern const unsigned long hugetlb_zero, hugetlb_infinity; 39 38 extern int sysctl_hugetlb_shm_group;
-8
kernel/sysctl.c
··· 906 906 }, 907 907 { 908 908 .ctl_name = CTL_UNNUMBERED, 909 - .procname = "hugetlb_dynamic_pool", 910 - .data = &hugetlb_dynamic_pool, 911 - .maxlen = sizeof(hugetlb_dynamic_pool), 912 - .mode = 0644, 913 - .proc_handler = &proc_dointvec, 914 - }, 915 - { 916 - .ctl_name = CTL_UNNUMBERED, 917 909 .procname = "nr_overcommit_hugepages", 918 910 .data = &nr_overcommit_huge_pages, 919 911 .maxlen = sizeof(nr_overcommit_huge_pages),
-5
mm/hugetlb.c
··· 31 31 static unsigned int surplus_huge_pages_node[MAX_NUMNODES]; 32 32 static gfp_t htlb_alloc_mask = GFP_HIGHUSER; 33 33 unsigned long hugepages_treat_as_movable; 34 - int hugetlb_dynamic_pool; 35 34 unsigned long nr_overcommit_huge_pages; 36 35 static int hugetlb_next_nid; 37 36 ··· 228 229 { 229 230 struct page *page; 230 231 unsigned int nid; 231 - 232 - /* Check if the dynamic pool is enabled */ 233 - if (!hugetlb_dynamic_pool) 234 - return NULL; 235 232 236 233 /* 237 234 * Assume we will successfully allocate the surplus page to