aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorYanan Wang <[email protected]>2021-03-30 16:08:52 +0800
committerPaolo Bonzini <[email protected]>2021-04-20 04:18:52 -0400
commit3b70c4d128a7781f507fa072d60ce5df3fdfcaa6 (patch)
tree88bcc10c07cd03addc7ce82763ffc4ceb5183945 /tools/perf/scripts/python
parent6436430e29fb250c140c94a8fcc218a832dcaf74 (diff)
KVM: selftests: Add a helper to get system configured THP page size
If we want to have some tests about transparent hugepages, the system configured THP hugepage size should better be known by the tests, which can be used for kinds of alignment or guest memory accessing of vcpus... So it makes sense to add a helper to get the transparent hugepage size. With VM_MEM_SRC_ANONYMOUS_THP specified in vm_userspace_mem_region_add(), we now stat /sys/kernel/mm/transparent_hugepage to check whether THP is configured in the host kernel before madvise(). Based on this, we can also read file /sys/kernel/mm/transparent_hugepage/hpage_pmd_size to get THP hugepage size. Signed-off-by: Yanan Wang <[email protected]> Reviewed-by: Ben Gardon <[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