kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Qin Chuanyu <qinchuanyu@huawei.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	jasowang@redhat.com, KVM list <kvm@vger.kernel.org>
Subject: Re: [PATCH] virtio: make udp more efficient by avoiding indirect desc
Date: Thu, 13 Feb 2014 13:27:44 +1030	[thread overview]
Message-ID: <87a9dvg1nb.fsf@rustcorp.com.au> (raw)
In-Reply-To: <52FA3AAC.2050003@huawei.com>

Qin Chuanyu <qinchuanyu@huawei.com> writes:
> udp packet use 2 buffers at least, one for vnet_hdr and
> one for skb->data.
> we could change the threshold from 2 to 3, so the udp packet
> which data buff only using single desc will gain from this.
> the guest would avoid from allocating memory dynamically.
> the host would avoid from translating indirect desc.
>
> Signed-off-by: Chuanyu Qin <qinchuanyu@huawei.com>

We should really adapt the threshold depending on how full the ring is.
If it's gotten cramped recently, prefer indirect.  See linux/average.h.

Such a change would have to be benchmarked carefully though!
Cheers,
Rusty.

      parent reply	other threads:[~2014-02-13  4:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 14:58 [PATCH] virtio: make udp more efficient by avoiding indirect desc Qin Chuanyu
2014-02-11 15:43 ` Michael S. Tsirkin
2014-02-12  1:51   ` Qin Chuanyu
2014-02-12  8:59   ` Paolo Bonzini
2014-03-03 11:22   ` Qin Chuanyu
2014-02-13  2:57 ` Rusty Russell [this message]

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=87a9dvg1nb.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=qinchuanyu@huawei.com \
    /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).