ratelimit cma_alloc messages

Bug #1828092 reported by dann frazier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Disco
Fix Released
Undecided
dann frazier

Bug Description

[Impact]
As described in bug 1823753, failures to allocate DMA out of CMA space can result in ~10K cma_alloc() error messages. While non-fatal (the code falls back to allocating memory out of non-CMA space), the error messages themselves can be a problem - esp. for systems w/ slow consoles like the HP m400 (9600 baud). It slows down boot so much that MAAS deploys fail due to timeout.

[Test Case]
Boot the disco kernel on an HP m400 or a HiSilicon D06 w/ the SMMU disabled in the BIOS.

[Fix]
Ratelimit the messages.

[Regression Risk]
Minimal - we're just attempting to quiescing log spew.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1828092

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Disco):
status: New → Incomplete
dann frazier (dannf)
Changed in linux (Ubuntu Disco):
status: Incomplete → In Progress
assignee: nobody → dann frazier (dannf)
Changed in linux (Ubuntu Disco):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-disco' to 'verification-done-disco'. If the problem still exists, change the tag 'verification-needed-disco' to 'verification-failed-disco'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-disco
Revision history for this message
dann frazier (dannf) wrote :

disco verification:

ubuntu@d06-4:~$ cat /proc/version
Linux version 5.0.0-16-generic (buildd@bos02-arm64-013) (gcc version 8.3.0 (Ubuntu/Linaro 8.3.0-6ubuntu1)) #17-Ubuntu SMP Wed May 15 10:54:19 UTC 2019
ubuntu@d06-4:~$ dmesg | grep cma
[ 0.000000] cma: Reserved 16 MiB at 0x000000007f000000
[ 0.000000] Memory: 180830576K/184545152K available (11836K kernel code, 1694K rwdata, 5060K rodata, 5504K init, 1158K bss, 3698192K reserved, 16384K cma-reserved)
[ 18.211364] cma: cma_alloc: alloc failed, req-size: 33 pages, ret: -12
[ 18.217896] cma: cma_alloc: alloc failed, req-size: 33 pages, ret: -12
[ 18.254209] cma: cma_alloc: alloc failed, req-size: 33 pages, ret: -12
[ 18.308352] cma: cma_alloc: alloc failed, req-size: 33 pages, ret: -12
[ 18.328708] cma: cma_alloc: alloc failed, req-size: 33 pages, ret: -12
[ 18.350072] cma: cma_alloc: alloc failed, req-size: 33 pages, ret: -12
[ 18.350081] cma: cma_alloc: alloc failed, req-size: 33 pages, ret: -12
[ 18.350089] cma: cma_alloc: alloc failed, req-size: 33 pages, ret: -12
[ 18.350097] cma: cma_alloc: alloc failed, req-size: 33 pages, ret: -12
[ 18.350106] cma: cma_alloc: alloc failed, req-size: 33 pages, ret: -12
[ 27.962013] cma_alloc: 358 callbacks suppressed
[ 27.962014] cma: cma_alloc: alloc failed, req-size: 1 pages, ret: -12
[ 27.968453] cma: cma_alloc: alloc failed, req-size: 1 pages, ret: -12
[ 27.974915] cma: cma_alloc: alloc failed, req-size: 1 pages, ret: -12
[ 27.981347] cma: cma_alloc: alloc failed, req-size: 1 pages, ret: -12
[ 27.987779] cma: cma_alloc: alloc failed, req-size: 1 pages, ret: -12
[ 27.994211] cma: cma_alloc: alloc failed, req-size: 1 pages, ret: -12
[ 28.000647] cma: cma_alloc: alloc failed, req-size: 1 pages, ret: -12
[ 28.000649] cma: cma_alloc: alloc failed, req-size: 1 pages, ret: -12
[ 28.013539] cma: cma_alloc: alloc failed, req-size: 1 pages, ret: -12
[ 28.019974] cma: cma_alloc: alloc failed, req-size: 1 pages, ret: -12

tags: added: verification-done-disco
removed: verification-needed-disco
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (24.0 KiB)

This bug was fixed in the package linux - 5.0.0-16.17

---------------
linux (5.0.0-16.17) disco; urgency=medium

  * linux: 5.0.0-16.17 -proposed tracker (LP: #1829173)

  * shiftfs: lock security sensitive superblock flags (LP: #1827122)
    - SAUCE: shiftfs: lock down certain superblock flags

  * Please package libbpf (which is done out of the kernel src) in Debian [for
    19.10] (LP: #1826410)
    - SAUCE: tools -- fix add ability to disable libbfd

  * Disco update: 5.0.8 upstream stable release (LP: #1828415)
    - drm/i915/gvt: do not let pin count of shadow mm go negative
    - kbuild: pkg: use -f $(srctree)/Makefile to recurse to top Makefile
    - netfilter: nft_compat: use .release_ops and remove list of extension
    - netfilter: nf_tables: use-after-free in dynamic operations
    - netfilter: nf_tables: add missing ->release_ops() in error path of newrule()
    - hv_netvsc: Fix unwanted wakeup after tx_disable
    - ibmvnic: Fix completion structure initialization
    - ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
    - ipv6: Fix dangling pointer when ipv6 fragment
    - ipv6: sit: reset ip header pointer in ipip6_rcv
    - kcm: switch order of device registration to fix a crash
    - net: ethtool: not call vzalloc for zero sized memory request
    - net-gro: Fix GRO flush when receiving a GSO packet.
    - net/mlx5: Decrease default mr cache size
    - netns: provide pure entropy for net_hash_mix()
    - net: rds: force to destroy connection if t_sock is NULL in
      rds_tcp_kill_sock().
    - net/sched: act_sample: fix divide by zero in the traffic path
    - net/sched: fix ->get helper of the matchall cls
    - qmi_wwan: add Olicard 600
    - r8169: disable ASPM again
    - sctp: initialize _pad of sockaddr_in before copying to user memory
    - tcp: Ensure DCTCP reacts to losses
    - tcp: fix a potential NULL pointer dereference in tcp_sk_exit
    - vrf: check accept_source_route on the original netdevice
    - net/mlx5e: Fix error handling when refreshing TIRs
    - net/mlx5e: Add a lock on tir list
    - nfp: validate the return code from dev_queue_xmit()
    - nfp: disable netpoll on representors
    - bnxt_en: Improve RX consumer index validity check.
    - bnxt_en: Reset device on RX buffer errors.
    - net: ip_gre: fix possible use-after-free in erspan_rcv
    - net: ip6_gre: fix possible use-after-free in ip6erspan_rcv
    - net: bridge: always clear mcast matching struct on reports and leaves
    - net: thunderx: fix NULL pointer dereference in nicvf_open/nicvf_stop
    - net: vrf: Fix ping failed when vrf mtu is set to 0
    - net: core: netif_receive_skb_list: unlist skb before passing to pt->func
    - r8169: disable default rx interrupt coalescing on RTL8168
    - net: mlx5: Add a missing check on idr_find, free buf
    - net/mlx5e: Update xoff formula
    - net/mlx5e: Update xon formula
    - kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD
    - lib/string.c: implement a basic bcmp
    - Revert "clk: meson: clean-up clock registration"
    - tty: mark Siemens R3964 line discipline as BROKEN
    - [Config]: remove CONFIG_R3964
    - [Config]: add CONFIG_LDISC_AUTOLOAD=y
    - tty: ldisc: add sysctl to p...

Changed in linux (Ubuntu Disco):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.