[dpdk-dev] [PATCH v5] eal: fix allocating all free hugepages
Thomas Monjalon
thomas.monjalon at 6wind.com
Thu Jun 30 15:34:51 CEST 2016
> > EAL memory init allocates all free hugepages of the whole system,
> > which seen from sysfs, even when applications do not ask so many.
> > When there is a limitation on how many hugepages an application can
> > use (such as cgroup.hugetlb), or hugetlbfs is specified with an
> > option of size (exceeding the quota of the fs), it just fails to
> > start even there are enough hugepages allocated.
> >
> > To fix above issue, this patch:
> > - Changes the logic to continue memory init to see if hugetlb
> > requirement of application can be addressed by already allocated
> > hugepages.
> > - To make sure each hugepage is allocated successfully, we add a
> > recover mechanism, which relies on a mem access to fault-in
> > hugepages, and if it fails with SIGBUS, recover to previously
> > saved stack environment with siglongjmp().
> >
> > For the case of CONFIG_RTE_EAL_SINGLE_FILE_SEGMENTS (enabled by
> > default when compiling IVSHMEM target), it's indispensable to
> > mapp all free hugepages in the system. Under this case, it fails
> > to start when allocating fails.
[...]
> > Signed-off-by: Jianfeng Tan<jianfeng.tan at intel.com>
> > Acked-by: Neil Horman<nhorman at tuxdriver.com>
>
> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy at intel.com>
Applied, thanks
More information about the dev
mailing list