qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, Like Xu <like.xu@linux.intel.com>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [QUESTION] How to reduce network latency to improve netperf TCP_RR drastically?
Date: Tue, 11 Jun 2019 21:17:32 +0800	[thread overview]
Message-ID: <4c5a0454-865f-102e-94e5-6a38d011f33c@redhat.com> (raw)
In-Reply-To: <20190610114708-mutt-send-email-mst@kernel.org>


On 2019/6/10 下午11:55, Michael S. Tsirkin wrote:
> On Tue, Jun 04, 2019 at 03:10:43PM +0800, Like Xu wrote:
>> Hi Michael,
>>
>> At https://www.linux-kvm.org/page/NetworkingTodo, there is an entry for
>> network latency saying:
>>
>> ---
>> reduce networking latency:
>>   allow handling short packets from softirq or VCPU context
>>   Plan:
>>     We are going through the scheduler 3 times
>>     (could be up to 5 if softirqd is involved)
>>     Consider RX: host irq -> io thread -> VCPU thread ->
>>     guest irq -> guest thread.
>>     This adds a lot of latency.
>>     We can cut it by some 1.5x if we do a bit of work
>>     either in the VCPU or softirq context.
>>   Testing: netperf TCP RR - should be improved drastically
>>            netperf TCP STREAM guest to host - no regression
>>   Contact: MST
>> ---
>>
>> I am trying to make some contributions to improving netperf TCP_RR.
>> Could you please share more ideas or plans or implemental details to make it
>> happen?
>>
>> Thanks,
>> Like Xu
>
> So some of this did happen. netif_receive_skb is now called
> directly from tun_get_user.
>
> Question is about the rx/tun_put_user path now.
>
> If the vhost thread is idle, there's a single packet
> outstanding then maybe we can forward the packet to userspace
> directly from BH without waking up the thread.
>
> For this to work we need to map some userspace memory into kernel
> ahead of the time. For example, maybe it can happen when
> guest adds RX buffers? Copying Jason who's looking into
> memory mapping matters.


Btw, I wonder maybe it's time to make TODO wiki up to date.

Thanks



      parent reply	other threads:[~2019-06-11 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04  7:10 [Qemu-devel] [QUESTION] How to reduce network latency to improve netperf TCP_RR drastically? Like Xu
2019-06-10 15:55 ` Michael S. Tsirkin
2019-06-11  7:36   ` Jason Wang
2019-06-11 13:17   ` Jason Wang [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=4c5a0454-865f-102e-94e5-6a38d011f33c@redhat.com \
    --to=jasowang@redhat.com \
    --cc=like.xu@linux.intel.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.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).