Skip to content

Commit 40e4e71

Browse files
Hariprasad Shenaidavem330
authored andcommitted
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>
1 parent df0437e commit 40e4e71

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎net/core/dev.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
#include <linux/hrtimer.h>
140140
#include <linux/netfilter_ingress.h>
141141
#include <linux/sctp.h>
142+
#include <linux/crash_dump.h>
142143

143144
#include "net-sysfs.h"
144145

@@ -2249,7 +2250,8 @@ EXPORT_SYMBOL(netif_set_real_num_rx_queues);
22492250
*/
22502251
int netif_get_num_default_rss_queues(void)
22512252
{
2252-
return min_t(int, DEFAULT_MAX_NUM_RSS_QUEUES, num_online_cpus());
2253+
return is_kdump_kernel() ?
2254+
1 : min_t(int, DEFAULT_MAX_NUM_RSS_QUEUES, num_online_cpus());
22532255
}
22542256
EXPORT_SYMBOL(netif_get_num_default_rss_queues);
22552257

0 commit comments

Comments
 (0)