* [PATCH 1/1] xen-netfront: limit max queues number to online cpus
@ 2015-10-23 0:50 Joe Jin
2015-10-23 7:19 ` [Xen-devel] " Joe Jin
0 siblings, 1 reply; 2+ messages in thread
From: Joe Jin @ 2015-10-23 0:50 UTC (permalink / raw)
To: boris.ostrovsky, Konrad Rzeszutek Wilk, David S. Miller; +Cc: netdev, xen-devel
Should not allocate queues number more than online cpus.
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David S. Miller <davem@davemloft.net>
---
drivers/net/xen-netfront.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index f821a97..1eebd4e 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -2137,7 +2137,7 @@ static int __init netif_init(void)
/* Allow as many queues as there are CPUs if user has not
* specified a value.
*/
- if (xennet_max_queues == 0)
+ if (xennet_max_queues == 0 || xennet_max_queues > num_online_cpus())
xennet_max_queues = num_online_cpus();
return xenbus_register_frontend(&netfront_driver);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Xen-devel] [PATCH 1/1] xen-netfront: limit max queues number to online cpus
2015-10-23 0:50 [PATCH 1/1] xen-netfront: limit max queues number to online cpus Joe Jin
@ 2015-10-23 7:19 ` Joe Jin
0 siblings, 0 replies; 2+ messages in thread
From: Joe Jin @ 2015-10-23 7:19 UTC (permalink / raw)
To: boris.ostrovsky, Konrad Rzeszutek Wilk, David S. Miller; +Cc: netdev, xen-devel
We need to take care sysfs too, please ignore this patch, I'll create
new one later for review and comment.
Thanks,
Joe
On 10/23/2015 08:50 AM, Joe Jin wrote:
> Should not allocate queues number more than online cpus.
>
> Signed-off-by: Joe Jin <joe.jin@oracle.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: David S. Miller <davem@davemloft.net>
> ---
> drivers/net/xen-netfront.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
> index f821a97..1eebd4e 100644
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -2137,7 +2137,7 @@ static int __init netif_init(void)
> /* Allow as many queues as there are CPUs if user has not
> * specified a value.
> */
> - if (xennet_max_queues == 0)
> + if (xennet_max_queues == 0 || xennet_max_queues > num_online_cpus())
> xennet_max_queues = num_online_cpus();
>
> return xenbus_register_frontend(&netfront_driver);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-23 7:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-23 0:50 [PATCH 1/1] xen-netfront: limit max queues number to online cpus Joe Jin
2015-10-23 7:19 ` [Xen-devel] " Joe Jin
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).