]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
Merge branch 'net-Optimize-the-qed-allocations-inside-kdump-kernel'
authorDavid S. Miller <davem@davemloft.net>
Mon, 11 May 2020 20:25:00 +0000 (13:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 May 2020 20:25:00 +0000 (13:25 -0700)
commita90f704ad9499b0737b741ccea13c0a6fb6fa8d4
tree10019e0f4ed358ff923f3882c8290f869e31312e
parent01f2b3dac8c4bebeb0ec15c4b7b59993766493cc
parent37d4f8a6b41f622608671ab8434194c819a5e444
Merge branch 'net-Optimize-the-qed-allocations-inside-kdump-kernel'

Bhupesh Sharma says:

====================
net: Optimize the qed* allocations inside kdump kernel

Changes since v1:
----------------
- v1 can be seen here: http://lists.infradead.org/pipermail/kexec/2020-May/024935.html
- Addressed review comments received on v1:
  * Removed unnecessary paranthesis.
  * Used a different macro for minimum RX/TX ring count value in kdump
    kernel.

Since kdump kernel(s) run under severe memory constraint with the
basic idea being to save the crashdump vmcore reliably when the primary
kernel panics/hangs, large memory allocations done by a network driver
can cause the crashkernel to panic with OOM.

The qed* drivers take up approximately 214MB memory when run in the
kdump kernel with the default configuration settings presently used in
the driver. With an usual crashkernel size of 512M, this allocation
is equal to almost half of the total crashkernel size allocated.

See some logs obtained via memstrack tool (see [1]) below:
 dracut-pre-pivot[676]: ======== Report format module_summary: ========
 dracut-pre-pivot[676]: Module qed using 149.6MB (2394 pages), peak allocation 149.6MB (2394 pages)
 dracut-pre-pivot[676]: Module qede using 65.3MB (1045 pages), peak allocation 65.3MB (1045 pages)

This patchset tries to reduce the overall memory allocation profile of
the qed* driver when they run in the kdump kernel. With these
optimization we can see a saving of approx 85M in the kdump kernel:
 dracut-pre-pivot[671]: ======== Report format module_summary: ========
 dracut-pre-pivot[671]: Module qed using 124.6MB (1993 pages), peak allocation 124.7MB (1995 pages)
 <..snip..>
 dracut-pre-pivot[671]: Module qede using 4.6MB (73 pages), peak allocation 4.6MB (74 pages)

And the kdump kernel can save vmcore successfully via both ssh and nfs
interfaces.

This patchset contains two patches:
[PATCH 1/2] - Reduces the default TX and RX ring count in kdump kernel.
[PATCH 2/2] - Disables qed SRIOV feature in kdump kernel (as it is
              normally not a supported kdump target for saving
      vmcore).

[1]. Memstrack tool: https://github.com/ryncsn/memstrack
====================

Signed-off-by: David S. Miller <davem@davemloft.net>