From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Wangkai (Kevin,C)" <wangkai86@huawei.com>
Cc: Lee yang <lee.yang@huawei.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"aliguori@amazon.com" <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH] Tap: fix vcpu long time io blocking on tap
Date: Fri, 11 Jul 2014 15:04:13 +0200 [thread overview]
Message-ID: <20140711130413.GA4255@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <87B246BB5ED53A4C98E4F9A35839EDE128F6F49D@nkgeml506-mbs.china.huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]
On Fri, Jul 11, 2014 at 01:05:30AM +0000, Wangkai (Kevin,C) wrote:
> When used a tap as net driver for vm, if too many packets was delivered to the
> guest os via tap interface, the guest os will be blocked on io events for a long
> time, while tap driver was busying process packets.
>
> kvm vcpu thread block on io lock call trace:
> __lll_lock_wait
> _L_lock_1004
> __pthread_mutex_lock
> qemu_mutex_lock
> kvm_cpu_exec
> qemu_kvm_cpu_thread_fn
> start_thread
>
> qemu io thread call trace:
> ...
> qemu_net_queue_send
> tap_send
> qemu_iohandler_poll
> main_loop_wait
> main_loop
>
>
> I think the qemu io lock time should be as small as possible, and the io work
> slice should be limited at a particular ration or time.
>
> ---
> Signed-off-by: Wangkai <wangkai86@huawei.com>
How many packets are you seeing in a single tap_send() call?
Have you profiled the tap_send() code path? Maybe it is performing some
operation that is very slow.
By the way, if you want good performance you should use vhost_net
instead of userspace vhost_net. Userspace virtio-net is not very
optimized.
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-07-11 13:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 1:05 [Qemu-devel] [PATCH] Tap: fix vcpu long time io blocking on tap Wangkai (Kevin,C)
2014-07-11 13:04 ` Stefan Hajnoczi [this message]
2014-07-14 1:55 ` Wangkai (Kevin,C)
2014-07-14 8:43 ` Stefan Hajnoczi
2014-07-14 10:44 ` Wangkai (Kevin,C)
2014-07-15 14:59 ` Stefan Hajnoczi
2014-07-16 10:10 ` Wangkai (Kevin,C)
2014-07-17 3:43 ` Wangkai (Kevin,C)
2014-07-17 5:36 ` Jason Wang
2014-07-17 7:48 ` Wangkai (Kevin,C)
2014-07-17 12:54 ` Stefan Hajnoczi
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=20140711130413.GA4255@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=aliguori@amazon.com \
--cc=lee.yang@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=wangkai86@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).