From: Rusty Russell <rusty@rustcorp.com.au>
To: Jason Wang <jasowang@redhat.com>,
Zang Hongyong <zanghongyong@huawei.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Qinchuanyu <qinchuanyu@huawei.com>,
"nab\@linux-iscsi.org" <nab@linux-iscsi.org>,
"\(netdev\@vger.kernel.org\)" <netdev@vger.kernel.org>,
"\(kvm\@vger.kernel.org\)" <kvm@vger.kernel.org>,
"Zhangjie \(HZ\)" <zhang.zhangjie@huawei.com>
Subject: Re: provide vhost thread per virtqueue for forwarding scenario
Date: Thu, 23 May 2013 13:43:29 +0930 [thread overview]
Message-ID: <8738tes592.fsf@rustcorp.com.au> (raw)
In-Reply-To: <519C98E2.9000102@redhat.com>
Jason Wang <jasowang@redhat.com> writes:
> On 05/22/2013 05:59 PM, Zang Hongyong wrote:
>> On 2013/5/20 15:43, Michael S. Tsirkin wrote:
>>> On Mon, May 20, 2013 at 02:11:19AM +0000, Qinchuanyu wrote:
>>> Yes, I don't think we want to create threads even more aggressively
>>> in all cases. I'm worried about scalability as it is.
>>> I think we should explore a flexible approach, use a thread pool
>>> (for example, a wq) to share threads between virtqueues,
>>> switch to a separate thread only if there's free CPU and existing
>>> threads are busy. Hopefully share threads between vhost instances too.
>> On Xen platform, network backend pv driver model has evolved to this
>> way. Netbacks from all DomUs share a thread pool,
>> and thread number eaqual to cpu core number.
>> Is there any plan for kvm paltform?
>
> There used to be two related RFCs for this, one is the multiple vhost
> workers from Anthony another is percpu vhost thread from Shirley. You
> can search the archives on netdev or kvm for the patches.
As I've said to MST before, I think our entire model is wrong.
Userspace should create the threads and call in. If you're doing kernel
acceleration, two extra threads per NIC is a tiny overhead.
Of course, such radical changes to vhost doesn't help existing users as
Qinchuanyu asked...
Cheers,
Rusty,
next prev parent reply other threads:[~2013-05-23 4:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-20 2:11 provide vhost thread per virtqueue for forwarding scenario Qinchuanyu
2013-05-20 7:43 ` Michael S. Tsirkin
2013-05-22 9:59 ` Zang Hongyong
2013-05-22 10:07 ` Jason Wang
2013-05-23 4:13 ` Rusty Russell [this message]
2013-05-22 10:10 ` Michael S. Tsirkin
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=8738tes592.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=nab@linux-iscsi.org \
--cc=netdev@vger.kernel.org \
--cc=qinchuanyu@huawei.com \
--cc=zanghongyong@huawei.com \
--cc=zhang.zhangjie@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