summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-02-25 16:04:25 +0100
committerDavid S. Miller <davem@davemloft.net>2014-02-26 15:27:50 -0500
commitff2ad3071f56697920a7154ca301fd45d17d57d2 (patch)
treee2c1746ff59c5a6c024196d119987adf69c49cba /drivers/net/ethernet/broadcom
parent7d0445d66a7619e23257570daa794dbf1d89c2a6 (diff)
downloadblackbird-obmc-linux-ff2ad3071f56697920a7154ca301fd45d17d57d2.tar.gz
blackbird-obmc-linux-ff2ad3071f56697920a7154ca301fd45d17d57d2.zip
bnx2x: save RAM in kdump kernel by using a single queue
When running in a kdump kernel, make sure to use only a single ethernet queue even if a num_queues option in /etc/modprobe.d/*.conf would specify otherwise. This saves memory, which tends to be scarce in kdump. This saves about 40 MB in the kdump environment on a setup with num_queues=8 in the config file. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 34d124998823..26bc25bd465d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -62,6 +62,11 @@ static void bnx2x_add_all_napi(struct bnx2x *bp)
static int bnx2x_calc_num_queues(struct bnx2x *bp)
{
int nq = bnx2x_num_queues ? : netif_get_num_default_rss_queues();
+
+ /* Reduce memory usage in kdump environment by using only one queue */
+ if (reset_devices)
+ nq = 1;
+
nq = clamp(nq, 1, BNX2X_MAX_QUEUES(bp));
return nq;
}
OpenPOWER on IntegriCloud