netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Jerry Chu <hkchu@google.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: qlen check in tun.c
Date: Wed, 19 Jun 2013 11:29:22 +0800	[thread overview]
Message-ID: <51C12592.6050503@redhat.com> (raw)
In-Reply-To: <CAPshTCgdb9FzKHzxkpDpowZjzqBv5yM_rBpcT88YmYBSojN8Tw@mail.gmail.com>

On 06/19/2013 10:31 AM, Jerry Chu wrote:
> In tun_net_xmit() the max qlen is computed as
> dev->tx_queue_len / tun->numqueues. For multi-queue configuration the
> latter may be way too small, forcing one to adjust txqueuelen based
> on number of queues created. (Well the default txqueuelen of
> 500/TUN_READQ_SIZE already seems too small even for single queue.)

Hi Jerry:

Do you have some test result of this? Anyway, tun allows userspace to
adjust this value based on its requirement.
>
> Wouldn't it be better to simply use dev->tx_queue_len to cap the qlen of
> each queue? This also seems to be more consistent with h/w multi-queues.

Make sense. Michael, any ideas on this?
>
> Also is there any objection to increase MAX_TAP_QUEUES from 8 to 16?
> Yes it will take up more space in struct tun_struct. But we are
> hitting the perf limit of 8 queues.

Not only the tun_struct, another issue of this is sizeof(netdev_queue)
which is 320 currently, if we use 16, it may be greater than 4096 which
lead high order page allocation. Need a solution such as flex array or
array of pointers.

Btw, I have draft patch on both, will post as rfc.

Thanks
> Thanks,
>
> Jerry

  reply	other threads:[~2013-06-19  3:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  2:31 qlen check in tun.c Jerry Chu
2013-06-19  3:29 ` Jason Wang [this message]
2013-06-19 19:39   ` Jerry Chu
2013-06-19 19:49     ` Rick Jones
2013-06-19 20:42       ` Jerry Chu
2013-06-19 21:37         ` Rick Jones
2013-06-20  8:07     ` Michael S. Tsirkin
2013-06-24  5:13       ` Jason Wang
2013-06-25 22:23       ` Jerry Chu
2013-06-26  5:23         ` Jason Wang
     [not found]           ` <CAPshTCjbOnZJ6c2tyLbBqZ3Pz=xi+cBMvi=0BqPDyiXJ+jDDOA@mail.gmail.com>
2013-06-26  5:44             ` Jason Wang
2013-06-21  6:44     ` Jason Wang

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=51C12592.6050503@redhat.com \
    --to=jasowang@redhat.com \
    --cc=hkchu@google.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.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).