The hisi_sas maintainer is experimenting with a patch that will change
the driver's 33 page allocations to single page allocations. If there is
no significant performance impact, that could be a way forward to deal
with the fragmentation issue costing us up to 31M of CMA.

In addition, there is DMA/CMA optimization making its way upstream, that uses 
non-CMA memory for single page requests:
  https://lkml.org/lkml/2019/5/6/1219

This avoids the impact of the CMA memory usage increase in the RDMA/hns
driver (see comment #11) and - with the aforementioned hisi_sas patch -
those allocations as well.

After those optimizations, I am able to fulfill all cma allocation requests 
from our D06 CS board[*] with cma=64M. However, Ubuntu ships with only 16M of 
CMA. Note that upstream's defconfig allocates 32M of CMA,
 which is apparently required for the RPi VC4:
  
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ebf089248dab2ef569e5e26a607f0977a71182b7

So there maybe other reasons we want to bump to at least 32M - I'm not
sure that we'd want to go all the way to 64M for general purpose kernel
though.

[*] Keeping in mind that this is just tuning for a specific
system/config. Throw in a bunch of mlx5 cards, and I suspect we'll still
see cma_alloc log spew on this platform.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1823753

Title:
  arm64: cma_alloc errors at boot

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  On some arm64 systems[*] we are seeing a spew of messages on the
  console:

  [   19.534097] cma: cma_alloc: alloc failed, req-size: 64 pages, ret: -12
  [   19.534109] cma: cma_alloc: alloc failed, req-size: 16 pages, ret: -12
  [   19.534113] cma: cma_alloc: alloc failed, req-size: 64 pages, ret: -12
  [   19.534126] cma: cma_alloc: alloc failed, req-size: 16 pages, ret: -12
  [   19.534130] cma: cma_alloc: alloc failed, req-size: 64 pages, ret: -12
  [   19.534142] cma: cma_alloc: alloc failed, req-size: 16 pages, ret: -12
  [   19.534146] cma: cma_alloc: alloc failed, req-size: 64 pages, ret: -12
  [   19.534157] cma: cma_alloc: alloc failed, req-size: 16 pages, ret: -12
  [   19.534161] cma: cma_alloc: alloc failed, req-size: 64 pages, ret: -12
  [   19.534173] cma: cma_alloc: alloc failed, req-size: 16 pages, ret: -12
  [   19.534177] cma: cma_alloc: alloc failed, req-size: 64 pages, ret: -12

  This appears to be non-fatal - impacted systems all eventually boot.
  But, at least in the case of the HP m400, it slows down boot enough
  that MAAS' default timeout will expire before completing deployment.

  [*] Observed on a HiSilicon D06 w/ SMMU disabled in the BIOS, as well
  as an HP m400 (APM X-Gene) cartridge - although, not on another one
  that - in theory - should be identical.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1823753/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to