From: Aneesh Kumar K.V Date: Sat, 21 Jul 2012 00:54:00 +0000 (+1000) Subject: hugeltb: mark hugelb_max_hstate __read_mostly X-Git-Tag: next-20120725~1^2~248 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1de179790bf79cdf58c71292e92e034632aefbb9;p=karo-tx-linux.git hugeltb: mark hugelb_max_hstate __read_mostly We set this value only during boot. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Michal Hocko Signed-off-by: Andrew Morton --- diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 4aca05727244..3d677dd41898 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -22,7 +22,7 @@ struct hugepage_subpool { }; extern spinlock_t hugetlb_lock; -extern int hugetlb_max_hstate; +extern int hugetlb_max_hstate __read_mostly; #define for_each_hstate(h) \ for ((h) = hstates; (h) < &hstates[hugetlb_max_hstate]; (h)++) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index e899a2d5dee3..d5971597736b 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -35,7 +35,7 @@ const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL; static gfp_t htlb_alloc_mask = GFP_HIGHUSER; unsigned long hugepages_treat_as_movable; -int hugetlb_max_hstate; +int hugetlb_max_hstate __read_mostly; unsigned int default_hstate_idx; struct hstate hstates[HUGE_MAX_HSTATE];