Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40e4e713 authored by Hariprasad Shenai's avatar Hariprasad Shenai Committed by David S. Miller
Browse files

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: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df0437e1
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -139,6 +139,7 @@
#include <linux/hrtimer.h>
#include <linux/hrtimer.h>
#include <linux/netfilter_ingress.h>
#include <linux/netfilter_ingress.h>
#include <linux/sctp.h>
#include <linux/sctp.h>
#include <linux/crash_dump.h>


#include "net-sysfs.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)
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);
EXPORT_SYMBOL(netif_get_num_default_rss_queues);