Searched hist:"5579 fa682a3411e5ed58bde35af5128f1044a4b9" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/tools/testing/selftests/kvm/lib/ |
H A D | test_util.c | diff 5579fa682a3411e5ed58bde35af5128f1044a4b9 Tue Mar 30 03:08:53 CDT 2021 Yanan Wang <wangyanan55@huawei.com> 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 <wangyanan55@huawei.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Message-Id: <20210330080856.14940-8-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
/openbmc/linux/tools/testing/selftests/kvm/include/ |
H A D | test_util.h | diff 5579fa682a3411e5ed58bde35af5128f1044a4b9 Tue Mar 30 03:08:53 CDT 2021 Yanan Wang <wangyanan55@huawei.com> 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 <wangyanan55@huawei.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Message-Id: <20210330080856.14940-8-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|