From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4THs-00021D-0u for qemu-devel@nongnu.org; Wed, 31 Jul 2013 06:05:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4THl-0000Wl-P5 for qemu-devel@nongnu.org; Wed, 31 Jul 2013 06:05:43 -0400 Received: from cantor2.suse.de ([195.135.220.15]:53785 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4THl-0000WM-7d for qemu-devel@nongnu.org; Wed, 31 Jul 2013 06:05:37 -0400 Message-ID: <51F8E16E.5010201@suse.de> Date: Wed, 31 Jul 2013 12:05:34 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1375258430-2120-1-git-send-email-v.maffione@gmail.com> <1375258430-2120-2-git-send-email-v.maffione@gmail.com> In-Reply-To: <1375258430-2120-2-git-send-email-v.maffione@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v5 1/2] e1000: add interrupt mitigation support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincenzo Maffione Cc: aliguori@us.ibm.com, mst@redhat.com, rizzo@iet.unipi.it, jasowang@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com, g.lettieri@iet.unipi.it, lersek@redhat.com Am 31.07.2013 10:13, schrieb Vincenzo Maffione: > This patch partially implements the e1000 interrupt mitigation mechanis= ms. > Using a single QEMUTimer, it emulates the ITR register (which is the ne= wer > mitigation register, recommended by Intel) and approximately emulates > RADV and TADV registers. TIDV and RDTR register functionalities are not > emulated (RDTR is only used to validate RADV, according to the e1000 sp= ecs). >=20 > RADV, TADV, TIDV and RDTR registers make up the older e1000 mitigation > mechanism and would need a timer each to be completely emulated. Howeve= r, > a single timer has been used in order to reach a good compromise betwee= n > emulation accuracy and simplicity/efficiency. >=20 > The implemented mechanism can be enabled/disabled specifying the comman= d > line e1000-specific boolean parameter "mit", e.g. "mitigation" in example and property definitions below. >=20 > qemu-system-x86_64 -device e1000,mitigation=3Don,... ... >=20 > For more information, see the Software developer's manual at > http://download.intel.com/design/network/manuals/8254x_GBe_SDM.pdf. >=20 > Interrupt mitigation boosts performance when the guest suffers from > an high interrupt rate (i.e. receiving short UDP packets at high packet > rate). For some numerical results see the following link > http://info.iet.unipi.it/~luigi/papers/20130520-rizzo-vm.pdf >=20 > Signed-off-by: Vincenzo Maffione > --- > hw/net/e1000.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++= ++++++-- > 1 file changed, 128 insertions(+), 3 deletions(-) >=20 > diff --git a/hw/net/e1000.c b/hw/net/e1000.c > index fdb1f89..32014c2 100644 > --- a/hw/net/e1000.c > +++ b/hw/net/e1000.c [...] > @@ -1385,6 +1508,8 @@ static Property e1000_properties[] =3D { > DEFINE_NIC_PROPERTIES(E1000State, conf), > DEFINE_PROP_BIT("autonegotiation", E1000State, > compat_flags, E1000_FLAG_AUTONEG_BIT, true), > + DEFINE_PROP_BIT("mitigation", E1000State, > + compat_flags, E1000_FLAG_MIT_BIT, true), > DEFINE_PROP_END_OF_LIST(), > }; > =20 Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg