aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorYanan Wang <[email protected]>2021-03-30 16:08:53 +0800
committerPaolo Bonzini <[email protected]>2021-04-20 04:18:52 -0400
commit5579fa682a3411e5ed58bde35af5128f1044a4b9 (patch)
tree46657689fe808f51cec2fcc9caab777c0eb7f5c0 /tools/perf/scripts/python
parent3b70c4d128a7781f507fa072d60ce5df3fdfcaa6 (diff)
KVM: selftests: Add a helper to get system default hugetlb page size
If HUGETLB is configured in the host kernel, then we can know the system default hugetlb page size through *cat /proc/meminfo*. Otherwise, we will not see the information of hugetlb pages in file /proc/meminfo if it's not configured. So add a helper to determine whether HUGETLB is configured and then get the default page size by reading /proc/meminfo. This helper can be useful when a program wants to use the default hugetlb pages of the system and doesn't know the default page size. Signed-off-by: Yanan Wang <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions