netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 10/13] bnx2x: Set default value of num_queues to 1 on 32-bit platforms
@ 2010-04-18 14:50 Vladislav Zolotarov
  2010-04-19  4:10 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Vladislav Zolotarov @ 2010-04-18 14:50 UTC (permalink / raw)
  To: Dave Miller; +Cc: Eilon Greenstein, netdev list, dmitry

The default was changed to save memory on 32bits systems.

Author: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x_main.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 2eb9a3b..a35def6 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -91,10 +91,17 @@ module_param(multi_mode, int, 0);
 MODULE_PARM_DESC(multi_mode, " Multi queue mode "
 			     "(0 Disable; 1 Enable (default))");
 
+#ifdef CONFIG_64BIT
 static int num_queues;
 module_param(num_queues, int, 0);
 MODULE_PARM_DESC(num_queues, " Number of queues for multi_mode=1"
 				" (default is as a number of CPUs)");
+#else
+static int num_queues = 1;
+module_param(num_queues, int, 0);
+MODULE_PARM_DESC(num_queues, " Number of queues for multi_mode=1"
+				" (default 1)");
+#endif
 
 static int disable_tpa;
 module_param(disable_tpa, int, 0);
-- 
1.6.3.3





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

* Re: [PATCH 10/13] bnx2x: Set default value of num_queues to 1 on 32-bit platforms
  2010-04-18 14:50 [PATCH 10/13] bnx2x: Set default value of num_queues to 1 on 32-bit platforms Vladislav Zolotarov
@ 2010-04-19  4:10 ` David Miller
  2010-04-19  6:06   ` Eilon Greenstein
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2010-04-19  4:10 UTC (permalink / raw)
  To: vladz; +Cc: eilong, netdev, dmitry

From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Sun, 18 Apr 2010 17:50:24 +0300

> The default was changed to save memory on 32bits systems.
> 
> Author: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

This is absolutely rediculious.

There is no reason in the world to restrict multiqueue to only 64-bit
systems.

If there is a memory allocation issue, fix that!  Is it vmalloc() space
usage?

You don't even describe what the hell the problem is, so nobody can
figure out _WHY_ you're making this change.  That's so incredibly
frustrating because it makes it impossible for anyone to sanely
evaluate the patch.

The more I read of this patch series, the more I am incredibly
disappointed with the poor quality of these changes.

This is the worst patch series submitted by Broadcom engieers,
ever!

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

* Re: [PATCH 10/13] bnx2x: Set default value of num_queues to 1 on 32-bit platforms
  2010-04-19  4:10 ` David Miller
@ 2010-04-19  6:06   ` Eilon Greenstein
  2010-04-19  6:29     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Eilon Greenstein @ 2010-04-19  6:06 UTC (permalink / raw)
  To: David Miller; +Cc: Vladislav Zolotarov, netdev@vger.kernel.org, Dmitry Kravkov

On Sun, 2010-04-18 at 21:10 -0700, David Miller wrote:
> From: "Vladislav Zolotarov" <vladz@broadcom.com>
> Date: Sun, 18 Apr 2010 17:50:24 +0300
> 
> > The default was changed to save memory on 32bits systems.
> > 
> > Author: Dmitry Kravkov <dmitry@broadcom.com>
> > Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> > Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> > Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> 
> This is absolutely rediculious.
> 
> There is no reason in the world to restrict multiqueue to only 64-bit
> systems.
> 
> If there is a memory allocation issue, fix that!  Is it vmalloc() space
> usage?

Yes - running low on vmalloc is the reason. This patch does not restrict
the usage of multi queue on 32bits - it is just changing the default
queues values from the number of available CPUs to 1. If the user will
use another value, it will work as before.

We encounter few issues were a 32bit kernel was installed on a
multi-core platform and the driver allocated "too many" queues. One way
to go is to limit the queue size and the other is the number of queues -
leaving it as is caused issues due to running low on kernel virtual
memory so a change was needed.

Dave, what is your preference:
- re-submitting this patch with a proper description?
- limit the size of each queue?
- other?

Thanks,
Eilon



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

* Re: [PATCH 10/13] bnx2x: Set default value of num_queues to 1 on 32-bit platforms
  2010-04-19  6:06   ` Eilon Greenstein
@ 2010-04-19  6:29     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-04-19  6:29 UTC (permalink / raw)
  To: eilong; +Cc: vladz, netdev, dmitry

From: "Eilon Greenstein" <eilong@broadcom.com>
Date: Mon, 19 Apr 2010 09:06:21 +0300

> Yes - running low on vmalloc is the reason. This patch does not restrict
> the usage of multi queue on 32bits - it is just changing the default
> queues values from the number of available CPUs to 1. If the user will
> use another value, it will work as before.

Changing the default to 1 is equivalent to disabling multi-queue.

> We encounter few issues were a 32bit kernel was installed on a
> multi-core platform and the driver allocated "too many" queues. One way
> to go is to limit the queue size and the other is the number of queues -
> leaving it as is caused issues due to running low on kernel virtual
> memory so a change was needed.

Look into using an allocation strategy other than vmalloc(), in fact
I can't see why you need to much memory that vmalloc() must be used
in the first place.

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

end of thread, other threads:[~2010-04-19  6:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-18 14:50 [PATCH 10/13] bnx2x: Set default value of num_queues to 1 on 32-bit platforms Vladislav Zolotarov
2010-04-19  4:10 ` David Miller
2010-04-19  6:06   ` Eilon Greenstein
2010-04-19  6:29     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).