From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Juergen Gross <jgross@suse.com>,
linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
netdev@vger.kernel.org
Cc: wei.liu2@citrix.com, paul.durrant@citrix.com
Subject: Re: [PATCH 1/2] xen/netfront: set default upper limit of tx/rx queues to 8
Date: Tue, 10 Jan 2017 09:53:44 -0500 [thread overview]
Message-ID: <3ae4da4f-6a6a-db95-67a3-c0fba5524df1@oracle.com> (raw)
In-Reply-To: <20170110133252.5346-2-jgross@suse.com>
On 01/10/2017 08:32 AM, Juergen Gross wrote:
> The default for the number of tx/rx queues of one interface is the
> number of vcpus of the system today. As each queue pair reserves 512
> grant pages this default consumes a ridiculous number of grants for
> large guests.
>
> Limit the queue number to 8 as default. This value can be modified
> via a module parameter if required.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> drivers/net/xen-netfront.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
> index a479cd9..490c865 100644
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -57,6 +57,7 @@
> #include <xen/interface/grant_table.h>
>
> /* Module parameters */
> +#define MAX_QUEUES_DEFAULT 8
> static unsigned int xennet_max_queues;
> module_param_named(max_queues, xennet_max_queues, uint, 0644);
> MODULE_PARM_DESC(max_queues,
> @@ -2164,11 +2165,12 @@ static int __init netif_init(void)
>
> pr_info("Initialising Xen virtual ethernet driver\n");
>
> - /* Allow as many queues as there are CPUs if user has not
> + /* Allow as many queues as there are CPUs inut max. 8 if user has not
Based on comment change in the second patch: s/inut/but/ ? Also, comment
style in both patches.
Other than that, for both:
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> * specified a value.
> */
> if (xennet_max_queues == 0)
> - xennet_max_queues = num_online_cpus();
> + xennet_max_queues = min_t(unsigned int, MAX_QUEUES_DEFAULT,
> + num_online_cpus());
>
> return xenbus_register_frontend(&netfront_driver);
> }
next prev parent reply other threads:[~2017-01-10 14:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-10 13:32 [PATCH 0/2] xen/net: limit number of tx/rx queues Juergen Gross
2017-01-10 13:32 ` [PATCH 1/2] xen/netfront: set default upper limit of tx/rx queues to 8 Juergen Gross
2017-01-10 14:53 ` Boris Ostrovsky [this message]
2017-01-10 15:02 ` Juergen Gross
2017-01-10 13:32 ` [PATCH 2/2] xen/netback: " Juergen Gross
2017-01-10 13:54 ` [PATCH 0/2] xen/net: limit number of tx/rx queues Wei Liu
2017-01-30 2:55 ` Boris Ostrovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ae4da4f-6a6a-db95-67a3-c0fba5524df1@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paul.durrant@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).