Skip to content

Commit

Permalink
net: Reduce queue allocation to one in kdump kernel
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hariprasad Shenai authored and David S. Miller committed Jun 8, 2016
1 parent df0437e commit 40e4e71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 40e4e71

Please sign in to comment.