aboutsummaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 16a0f32c4820..c57740bb203a 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -30,6 +30,7 @@
30#include <linux/hugetlb.h> 30#include <linux/hugetlb.h>
31#include <linux/hugetlb_cgroup.h> 31#include <linux/hugetlb_cgroup.h>
32#include <linux/node.h> 32#include <linux/node.h>
33#include <linux/hugetlb_cgroup.h>
33#include "internal.h" 34#include "internal.h"
34 35
35const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL; 36const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL;
@@ -1930,6 +1931,13 @@ void __init hugetlb_add_hstate(unsigned order)
1930 h->next_nid_to_free = first_node(node_states[N_HIGH_MEMORY]); 1931 h->next_nid_to_free = first_node(node_states[N_HIGH_MEMORY]);
1931 snprintf(h->name, HSTATE_NAME_LEN, "hugepages-%lukB", 1932 snprintf(h->name, HSTATE_NAME_LEN, "hugepages-%lukB",
1932 huge_page_size(h)/1024); 1933 huge_page_size(h)/1024);
1934 /*
1935 * Add cgroup control files only if the huge page consists
1936 * of more than two normal pages. This is because we use
1937 * page[2].lru.next for storing cgoup details.
1938 */
1939 if (order >= HUGETLB_CGROUP_MIN_ORDER)
1940 hugetlb_cgroup_file_init(hugetlb_max_hstate - 1);
1933 1941
1934 parsed_hstate = h; 1942 parsed_hstate = h;
1935} 1943}