summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorHariprasad Shenai <hariprasad@chelsio.com>2016-06-08 18:09:08 +0530
committerDavid S. Miller <davem@davemloft.net>2016-06-08 11:13:58 -0700
commit40e4e713ebb279eb569584836d7cc6b799ed7f7f (patch)
treec771486aef77ee0c1127b9083bdde96d04ac0cd8 /net/core
parentdf0437e147b3e562410d9705af4f0620654b07bb (diff)
downloadlinux-40e4e713ebb279eb569584836d7cc6b799ed7f7f.tar.bz2
net: Reduce queue allocation to one in kdump kernel
When in kdump kernel, reduce memory usage by only using a single Queue Set for multiqueue devices. So make netif_get_num_default_rss_queues() return one, when in kdump kernel. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index e0bcc39f4a7d..c43c9d2a88cf 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -139,6 +139,7 @@
#include <linux/hrtimer.h>
#include <linux/netfilter_ingress.h>
#include <linux/sctp.h>
+#include <linux/crash_dump.h>
#include "net-sysfs.h"
@@ -2249,7 +2250,8 @@ EXPORT_SYMBOL(netif_set_real_num_rx_queues);
*/
int netif_get_num_default_rss_queues(void)
{
- return min_t(int, DEFAULT_MAX_NUM_RSS_QUEUES, num_online_cpus());
+ return is_kdump_kernel() ?
+ 1 : min_t(int, DEFAULT_MAX_NUM_RSS_QUEUES, num_online_cpus());
}
EXPORT_SYMBOL(netif_get_num_default_rss_queues);