From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregory Haskins Subject: Re: TODO list for qemu+KVM networking performance v2 Date: Thu, 04 Jun 2009 13:16:05 -0400 Message-ID: <4A280155.2060100@gmail.com> References: <20090604164320.GB14592@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD97B3CCA5CA330E9DEA4AB6A" Cc: Dor Laor , Brian Stein , Avi Kivity , Herbert Xu , Chris Wright , Mark McLoughlin , Or Gerlitz , Yaron Haviv , Shahar Klein , Gleb Natapov , Dor Laor , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org To: "Michael S. Tsirkin" Return-path: Received: from mail-qy0-f176.google.com ([209.85.221.176]:42581 "EHLO mail-qy0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750845AbZFDRQM (ORCPT ); Thu, 4 Jun 2009 13:16:12 -0400 Received: by qyk6 with SMTP id 6so25633qyk.33 for ; Thu, 04 Jun 2009 10:16:13 -0700 (PDT) In-Reply-To: <20090604164320.GB14592@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD97B3CCA5CA330E9DEA4AB6A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Michael S. Tsirkin wrote: > As I'm new to qemu/kvm, to figure out how networking performance can be= improved, I > went over the code and took some notes. As I did this, I tried to reco= rd ideas > from recent discussions and ideas that came up on improving performance= =2E Thus > this list. > > This includes a partial overview of networking code in a virtual enviro= nment, with > focus on performance: I'm only interested in sending and receiving pack= ets, > ignoring configuration etc. > > I have likely missed a ton of clever ideas and older discussions, and p= robably > misunderstood some code. Please pipe up with corrections, additions, et= c. And > please don't take offence if I didn't attribute the idea correctly - mo= st of > them are marked mst by I don't claim they are original. Just let me kno= w. > > And there are a couple of trivial questions on the code - I'll > add answers here as they become available. > > I out up a copy at http://www.linux-kvm.org/page/Networking_Performance= as > well, and intend to dump updates there from time to time. > =20 Hi Michael, Not sure if you have seen this, but I've already started to work on the code for in-kernel devices and have a (currently non-virtio based) proof-of-concept network device which you can for comparative data. You can find details here: http://lkml.org/lkml/2009/4/21/408 (Will look at your list later, to see if I can add anything) > --- > > Short term plans: I plan to start out with trying out the following ide= as: > > save a copy in qemu on RX side in case of a single nic in vlan > implement virtio-host kernel module > > *detail on virtio-host-net kernel module project* > > virtio-host-net is a simple character device which gets memory layout i= nformation > from qemu, and uses this to convert between virtio descriptors to skbs.= > The skbs are then passed to/from raw socket (or we could bind virtio-ho= st > to physical device like raw socket does TBD). > > Interrupts will be reported to eventfd descriptors, and device will pol= l > eventfd descriptors to get kicks from guest. > > =20 I currently have a virtio transport for vbus implemented, but it still needs a virtio-net device-model backend written. If you are interested, we can work on this together to implement your idea. Its on my "todo" list for vbus anyway, but I am currently distracted with the irqfd/iosignalfd projects which are prereqs for vbus to be considered for merge. Basically vbus is a framework for declaring in-kernel devices (not kvm specific, per se) with a full security/containment model, a hot-pluggable configuration engine, and a dynamically loadable=20 device-model. The framework takes care of the details of signal-path and memory routing for you so that something like a virtio-net model can be implemented once and work in a variety of environments such as kvm, lguest, etc. Interested? -Greg --------------enigD97B3CCA5CA330E9DEA4AB6A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkooAVkACgkQP5K2CMvXmqHhvACbBnkLUP6a02fbB7x2imYGkcJP LH0Anjn7RS4LnFLjFfgK3DgAiiX1t6zX =QO4m -----END PGP SIGNATURE----- --------------enigD97B3CCA5CA330E9DEA4AB6A--