All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: Reduce queue allocation to one in kdump kernel
@ 2016-06-08 12:39 Hariprasad Shenai
  2016-06-08 18:14 ` David Miller
  2016-06-09 22:06 ` Cong Wang
  0 siblings, 2 replies; 3+ messages in thread
From: Hariprasad Shenai @ 2016-06-08 12:39 UTC (permalink / raw)
  To: davem; +Cc: netdev, nirranjan, Hariprasad Shenai

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>
---
 net/core/dev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 904ff431d570..161c4627a798 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);
 
-- 
2.3.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: Reduce queue allocation to one in kdump kernel
  2016-06-08 12:39 [PATCH net-next] net: Reduce queue allocation to one in kdump kernel Hariprasad Shenai
@ 2016-06-08 18:14 ` David Miller
  2016-06-09 22:06 ` Cong Wang
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-06-08 18:14 UTC (permalink / raw)
  To: hariprasad; +Cc: netdev, nirranjan

From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Wed,  8 Jun 2016 18:09:08 +0530

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: Reduce queue allocation to one in kdump kernel
  2016-06-08 12:39 [PATCH net-next] net: Reduce queue allocation to one in kdump kernel Hariprasad Shenai
  2016-06-08 18:14 ` David Miller
@ 2016-06-09 22:06 ` Cong Wang
  1 sibling, 0 replies; 3+ messages in thread
From: Cong Wang @ 2016-06-09 22:06 UTC (permalink / raw)
  To: Hariprasad Shenai
  Cc: David Miller, Linux Kernel Network Developers, nirranjan

On Wed, Jun 8, 2016 at 5:39 AM, Hariprasad Shenai
<hariprasad@chelsio.com> wrote:
> 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>
> ---
>  net/core/dev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 904ff431d570..161c4627a798 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());

IIRC, kdump kernel already uses cpus=1, or at least you can tell how many
CPU's you want in kdump config.

This change doesn't make any sense to me, we don't want to check
for kdump for every of such places, do we?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-09 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-08 12:39 [PATCH net-next] net: Reduce queue allocation to one in kdump kernel Hariprasad Shenai
2016-06-08 18:14 ` David Miller
2016-06-09 22:06 ` Cong Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.