OpenCloudOS-Kernel/tools
Yanan Wang 3b70c4d128 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 <wangyanan55@huawei.com>
Reviewed-by: Ben Gardon <bgardon@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-Id: <20210330080856.14940-7-wangyanan55@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-04-20 04:18:52 -04:00
..
accounting
arch
bootconfig
bpf
build
cgroup
debugging
edid
firewire
firmware
gpio
hv
iio
include tools/headers: sync headers of asm-generic/hugetlb_encode.h 2021-04-20 04:18:51 -04:00
io_uring
kvm/kvm_stat
laptop
leds
lib
memory-model
objtool objtool,x86: Fix uaccess PUSHF/POPF validation 2021-03-12 09:15:49 +01:00
pci
pcmcia
perf
power
scripts
spi
testing KVM: selftests: Add a helper to get system configured THP page size 2021-04-20 04:18:52 -04:00
thermal/tmon
time
tracing
usb
virtio
vm
wmi
Makefile