linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] net: Optimize the qed* allocations inside kdump kernel
@ 2020-05-05 19:04 Bhupesh Sharma
  2020-05-05 19:04 ` [PATCH 1/2] net: qed*: Reduce RX and TX default ring count when running " Bhupesh Sharma
  2020-05-05 19:04 ` [PATCH 2/2] net: qed: Disable SRIOV functionality " Bhupesh Sharma
  0 siblings, 2 replies; 7+ messages in thread
From: Bhupesh Sharma @ 2020-05-05 19:04 UTC (permalink / raw)
  To: netdev
  Cc: bhsharma, bhupesh.linux, kexec, linux-kernel, aelior,
	GR-everest-linux-l2, manishc, davem

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

-
Bhupesh Sharma (2):
  net: qed*: Reduce RX and TX default ring count when running inside
    kdump kernel
  net: qed: Disable SRIOV functionality inside kdump kernel

 drivers/net/ethernet/qlogic/qed/qed_sriov.h  | 10 +++++++---
 drivers/net/ethernet/qlogic/qede/qede.h      |  5 +++--
 drivers/net/ethernet/qlogic/qede/qede_main.c |  2 +-
 3 files changed, 11 insertions(+), 6 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-06  7:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 19:04 [PATCH 0/2] net: Optimize the qed* allocations inside kdump kernel Bhupesh Sharma
2020-05-05 19:04 ` [PATCH 1/2] net: qed*: Reduce RX and TX default ring count when running " Bhupesh Sharma
2020-05-05 21:24   ` David Miller
2020-05-06  5:04     ` Bhupesh Sharma
2020-05-06  6:51   ` [EXT] " Igor Russkikh
2020-05-06  7:13     ` Bhupesh Sharma
2020-05-05 19:04 ` [PATCH 2/2] net: qed: Disable SRIOV functionality " Bhupesh Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).