qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Is IOThread for virtio-net a good idea?


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] Is IOThread for virtio-net a good idea?
Date: Tue, 12 Feb 2019 13:40:53 -0500

On Tue, Feb 12, 2019 at 03:00:55PM +0800, Jason Wang wrote:
> 
> On 2019/2/12 下午2:48, Jason Wang wrote:
> > 
> > On 2019/2/11 下午9:40, Anton Kuchin wrote:
> > > As far as I can see currently IOThread offloading is used only for
> > > block devices and all others are emulated by main thread.
> > > 
> > > I expect that network devices can also benefit from processing in
> > > separate thread but I couldn't find any recent work in this
> > > direction. I'm going to implement a PoC but I want to ask if you
> > > know any previous attempts and do you know why it can be a total
> > > waste of time. Are there fundamental obstacles that prevent network
> > > emulation handling in IOThread?
> > > 
> > 
> > I think there're no obstacles.
> > 
> > The only question is whether or not you need to support legacy
> > networking backends. If the answer is yes, you need to convert them not
> > to assume context of Main Loop. But I don't think it's worth to support
> > them. We should focus on high speed solution like linking dpdk.
> > 
> > Another issue is the virtio implementation. Dpdk has virtio library
> > which is pretty optimized, we should consider to use it. But last time I
> > check the code, it was tightly coupled with AF_UNIX transport of
> > vhost-user. We may want to decouple it out of dpdk. Of course we can do
> > it our own as well. (Yes I know there's a vhost-user implementation, but
> > it was not optimized for performance).
> > 
> > I do have some prototype that is based on vhost-scsi-dataplane with a
> > TAP backend. I can send it to you if you wish.
> > 
> 
> Note, what I did is a vhost implementation inside IOThread. It doesn't use
> qemu memory core (which is slow for e.g 10Mpps) but vhost memory table.
> 
> Thanks

If you are going to all these lengths duplicating dpdk I would at least
make it out of process to qemu to improve security.
As an excercise, maybe start by generalizing pxe test to support vhost
user bridge. That would already be a win.


As for IOTLB, I advicated VTD support in vhost for a while.  VTD page
table parsing isn't a lot of code at all if you put invalidations in
userspace.  We ended up with the message-passing instead for portability
but we can go back for sure.



> 
> > Thanks
> > 
> > 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]