From: Rusty Russell <rusty@rustcorp•com.au>
To: Eric Dumazet <eric.dumazet@gmail•com>, Jason Wang <jasowang@redhat•com>
Cc: Michael Dalton <mwdalton@google•com>,
"Michael S. Tsirkin" <mst@redhat•com>,
netdev@vger•kernel.org, Daniel Borkmann <dborkman@redhat•com>,
virtualization@lists•linux-foundation.org,
Eric Dumazet <edumazet@google•com>,
"David S. Miller" <davem@davemloft•net>
Subject: Re: [PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
Date: Wed, 20 Nov 2013 12:36:09 +1030 [thread overview]
Message-ID: <87li0jddym.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1384328458.28458.96.camel@edumazet-glaptop2.roam.corp.google.com>
Eric Dumazet <eric.dumazet@gmail•com> writes:
> On Wed, 2013-11-13 at 15:10 +0800, Jason Wang wrote:
>
>> There's one concern with EWMA. How well does it handle multiple streams
>> each with different packet size? E.g there may be two flows, one with
>> 256 bytes each packet another is 64K. Looks like it can result we
>> allocate PAGE_SIZE buffer for 256 (which is bad since the
>> payload/truesize is low) bytes or 1500+ for 64K buffer (which is ok
>> since we can do coalescing).
>
> It's hard to predict the future ;)
>
> 256 bytes frames consume 2.5 KB anyway on a traditional NIC.
> If it was a concern, we would have it already.
>
> If you receive a mix of big and small frames, there is no win.
Well, that's not quite true. The device could optimistically look
through the queue a bit for a small buffer; it does not need to consume
in order. We'd probably want a feature bit for this.
I look forward to your thoughts on what mixing algorithm of different
sizes to use, of course.
Meanwhile, I suspect your patch works well because of 4k pages. 80%
non-GSO packets won't drop the average len below 4k. On PPC64 with 64k
pages, that's not true.
I wonder if "last used len" would work about as well; it really might if
we had a smarter device...
Cheers,
Rusty.
next prev parent reply other threads:[~2013-11-20 2:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 22:21 [PATCH net-next 1/4] virtio-net: mergeable buffer size should include virtio-net header Michael Dalton
2013-11-12 22:21 ` [PATCH net-next 2/4] net: allow > 0 order atomic page alloc in skb_page_frag_refill Michael Dalton
2013-11-12 22:42 ` Eric Dumazet
2013-11-12 22:21 ` [PATCH net-next 3/4] virtio-net: use per-receive queue page frag alloc for mergeable bufs Michael Dalton
2013-11-12 22:43 ` Eric Dumazet
2013-11-12 22:21 ` [PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer size for improved performance Michael Dalton
2013-11-13 7:10 ` Jason Wang
2013-11-13 7:40 ` Eric Dumazet
2013-11-20 2:06 ` Rusty Russell [this message]
2013-11-13 17:42 ` Michael S. Tsirkin
2013-11-16 9:06 ` Michael Dalton
2013-11-13 8:47 ` Ronen Hod
2013-11-13 14:19 ` Eric Dumazet
2013-11-13 16:43 ` Ronen Hod
2013-11-13 17:18 ` Eric Dumazet
2013-11-12 22:41 ` [PATCH net-next 1/4] virtio-net: mergeable buffer size should include virtio-net header Eric Dumazet
2013-11-13 6:53 ` Jason Wang
2013-11-13 17:39 ` Michael S. Tsirkin
2013-11-13 17:43 ` Michael S. Tsirkin
2013-11-14 7:38 ` David Miller
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=87li0jddym.fsf@rustcorp.com.au \
--to=rusty@rustcorp$(echo .)com.au \
--cc=davem@davemloft$(echo .)net \
--cc=dborkman@redhat$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=jasowang@redhat$(echo .)com \
--cc=mst@redhat$(echo .)com \
--cc=mwdalton@google$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=virtualization@lists$(echo .)linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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