aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDavid Rientjes <[email protected]>2014-08-06 16:06:51 -0700
committerLinus Torvalds <[email protected]>2014-08-06 18:01:19 -0700
commit238d3c13f0cce38752072dc90f4e828abdfec143 (patch)
tree686986a56b3ca23679850c9bd87429fb37dd7cba /tools/perf/scripts/python
parentf37d4298aa7f8b74395aa13c728677e2ed86fdaf (diff)
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 <[email protected]> Cc: Joonsoo Kim <[email protected]> Reviewed-by: Naoya Horiguchi <[email protected]> Reviewed-by: Luiz Capitulino <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Acked-by: Davidlohr Bueso <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions