Revert "hugetlb: Add hugetlb_dynamic_pool sysctl"
authorNishanth Aravamudan <nacc@us.ibm.com>
Tue, 18 Dec 2007 00:20:22 +0000 (16:20 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 18 Dec 2007 03:28:17 +0000 (19:28 -0800)
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>
include/linux/hugetlb.h
kernel/sysctl.c
mm/hugetlb.c

index f7bc869a29b8c7414c845be95987c4a1b403eb9f..30d606afcafe98c9f22cce117082cc3cb2af83ed 100644 (file)
@@ -33,7 +33,6 @@ void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed);
 
 extern unsigned long max_huge_pages;
 extern unsigned long hugepages_treat_as_movable;
-extern int hugetlb_dynamic_pool;
 extern unsigned long nr_overcommit_huge_pages;
 extern const unsigned long hugetlb_zero, hugetlb_infinity;
 extern int sysctl_hugetlb_shm_group;
index b85a1282605dabd592f4b29a24ed81d157444500..1135de7308723d43e8294d8fc492449dfd3699ee 100644 (file)
@@ -904,14 +904,6 @@ static struct ctl_table vm_table[] = {
                .mode           = 0644,
                .proc_handler   = &hugetlb_treat_movable_handler,
        },
-       {
-               .ctl_name       = CTL_UNNUMBERED,
-               .procname       = "hugetlb_dynamic_pool",
-               .data           = &hugetlb_dynamic_pool,
-               .maxlen         = sizeof(hugetlb_dynamic_pool),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-       },
        {
                .ctl_name       = CTL_UNNUMBERED,
                .procname       = "nr_overcommit_hugepages",
index 3a790651475a067c7cb8798f669fecd8796835c6..7224a4f071067c3d60a017d949daa2e97f0e8a5d 100644 (file)
@@ -31,7 +31,6 @@ static unsigned int free_huge_pages_node[MAX_NUMNODES];
 static unsigned int surplus_huge_pages_node[MAX_NUMNODES];
 static gfp_t htlb_alloc_mask = GFP_HIGHUSER;
 unsigned long hugepages_treat_as_movable;
-int hugetlb_dynamic_pool;
 unsigned long nr_overcommit_huge_pages;
 static int hugetlb_next_nid;
 
@@ -230,10 +229,6 @@ static struct page *alloc_buddy_huge_page(struct vm_area_struct *vma,
        struct page *page;
        unsigned int nid;
 
-       /* Check if the dynamic pool is enabled */
-       if (!hugetlb_dynamic_pool)
-               return NULL;
-
        /*
         * Assume we will successfully allocate the surplus page to
         * prevent racing processes from causing the surplus to exceed