[LTP] [PATCH] futex: skip futex_wake04.c if system not support huge pages
Li Wang
liwang@redhat.com
Mon Nov 16 10:01:17 CET 2015
Hi,
On Mon, Nov 16, 2015 at 3:37 PM, Wanlong Gao <wanlong.gao@gmail.com> wrote:
> On Mon, Nov 16, 2015 at 02:00:52PM +0800, Li Wang wrote:
> >
> > In my test system, there exist file "/proc/sys/vm/nr_hugepages" with
> normal
> > permission, but reject any R/W operation.
> >
> > So, if I use if (access(PATH_NR_HUGEPAGES, F_OK) == -1), It doesn't
> work.
> >
> > # ll /proc/sys/vm/nr_hugepages
> > -rw-r--r--. 1 root root 0 Nov 15 09:03 /proc/sys/vm/nr_hugepages
> >
> > # cat /proc/sys/vm/nr_hugepages
> > cat: write error: Bad address
>
> Would you show your kernel version or investigate why this happens?
> This should not exist if we disable the hugetlbfs in kernel config.
>
I looked close to my test bed, it is a KVM Guest which enabled hugetlbfs on
IBM POWER8E,
the config is:
CONFIG_CGROUP_HUGETLB=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
CONFIG_SYS_SUPPORTS_HUGETLBFS=y
CONFIG_TRANSPARENT_HUGEPAGE=y
# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set
CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
# uname -r
3.10.0-*.el7.ppc64le
>
> > VmallocChunk: 8589850624 kB
> > HardwareCorrupted: 0 kB
>
> > AnonHugePages: 0 kB
>
> This tells that your kernel support THP.
>
yes, the reason is that my kvm guest XML was not added these below line:
guest XML:
<memoryBacking>
<hugepages/>
</memoryBacking>
after adding them, the kvm guest can works well with hugepages.
it is a configuration issue of guest, not a kernel bug. so, I propose my
patch as previously.
Thanks~
--
Regards,
Li Wang
Email: liwang@redhat.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20151116/b0d09faa/attachment.html>
More information about the Ltp
mailing list