summaryrefslogtreecommitdiffstats
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2014-08-07 01:06:51 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 03:01:19 +0200
commit238d3c13f0cce38752072dc90f4e828abdfec143 (patch)
tree686986a56b3ca23679850c9bd87429fb37dd7cba /mm/vmalloc.c
parenthwpoison: fix race with changing page during offlining (diff)
downloadlinux-238d3c13f0cce38752072dc90f4e828abdfec143.tar.xz
linux-238d3c13f0cce38752072dc90f4e828abdfec143.zip
mm, hugetlb: generalize writes to nr_hugepages
Three different interfaces alter the maximum number of hugepages for an hstate: - /proc/sys/vm/nr_hugepages for global number of hugepages of the default hstate, - /sys/kernel/mm/hugepages/hugepages-X/nr_hugepages for global number of hugepages for a specific hstate, and - /sys/kernel/mm/hugepages/hugepages-X/nr_hugepages/mempolicy for number of hugepages for a specific hstate over the set of allowed nodes. Generalize the code so that a single function handles all of these writes instead of duplicating the code in two different functions. This decreases the number of lines of code, but also reduces the size of .text by about half a percent since set_max_huge_pages() can be inlined. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Acked-by: Davidlohr Bueso <davidlohr@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmalloc.c')
0 files changed, 0 insertions, 0 deletions