HPT allocation failures on POWER8 KVM hosts

Daniel Axtens dja at axtens.net
Mon Nov 18 13:02:00 AEDT 2019


Hi Roman,

> We're running a lot of KVM virtual machines on POWER8 hosts and
> sometimes new VMs can't be started because there are no contiguous
> regions for HPT because of CMA region fragmentation.
>
> The issue is covered in the LWN article: https://lwn.net/Articles/684611/
> The article points that you raised the problem on LSFMM 2016. However I
> couldn't find a follow up article on the issue.
>
> Looking at the kernel commit log I've identified a few commits that
> might reduce CMA fragmentaiton and overcome HPT allocation failure:
>   - bd2e75633c801 ("dma-contiguous: use fallback alloc_pages for single pages")
>   - 678e174c4c16a ("powerpc/mm/iommu: allow migration of cma allocated
>     pages during mm_iommu_do_alloc")
>   - 9a4e9f3b2d739 ("mm: update get_user_pages_longterm to migrate pages allocated from
>     CMA region")
>   - d7fefcc8de914 ("mm/cma: add PF flag to force non cma alloc")
>
> Are there any other commits that address the issue? What is the first
> kernel version that shouldn't have the HPT allocation problem due to CMA
> fragmentation?

I've had some success increasing the CMA allocation with the
kvm_cma_resv_ratio boot parameter - see
arch/powerpc/kvm/book3s_hv_builtin.c

The default is 5%. In a support case in a former job we had a customer
who increased this to I think 7 or 8% and saw the symptoms subside
dramatically.

HTH,
Daniel

>
> Thank you,
> Roman


More information about the Linuxppc-dev mailing list