qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4] e1000: add interrupt mitigation support


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v4] e1000: add interrupt mitigation support
Date: Tue, 30 Jul 2013 12:58:14 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jul 29, 2013 at 05:12:49PM +0200, Vincenzo Maffione wrote:
> This patch partially implements the e1000 interrupt mitigation mechanisms.
> Using a single QEMUTimer, it emulates the ITR register (which is the newer
> 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 specs).
> 
> RADV, TADV, TIDV and RDTR registers make up the older e1000 mitigation
> mechanism and would need a timer each to be completely emulated. However,
> a single timer has been used in order to reach a good compromise between
> emulation accuracy and simplicity/efficiency.
> 
> The implemented mechanism can be enabled/disabled specifying the command
> line e1000-specific boolean parameter "mit", e.g.
> 
>     qemu-system-x86_64 -device e1000,mitigation=on,... ...
> 
> For more information, see the Software developer's manual at
> http://download.intel.com/design/network/manuals/8254x_GBe_SDM.pdf.
> 
> 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
> 
> Signed-off-by: Vincenzo Maffione <address@hidden>
> ---
> I removed "mit_timer_on" and "mit_ide" from the VMstate subsection,
> since in the migration scheme they are always loaded as 0 on
> the destination QEMU instance. This also ensures that the mitigation
> timer is never active across a migration, so that we don't need
> to call qemu_mod_timer() in e1000_post_load().
> 
>  hw/net/e1000.c       | 131 
> +++++++++++++++++++++++++++++++++++++++++++++++++--
>  include/hw/i386/pc.h |   4 ++
>  2 files changed, 132 insertions(+), 3 deletions(-)
...
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index 7fb97b0..2e35263 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -235,6 +235,10 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
>              .driver   = "virtio-net-pci",\
>              .property = "any_layout",\
>              .value    = "off",\
> +        },{\
> +            .driver   = "e1000",\
> +            .property = "mitigation",\
> +            .value    = "off",\
>          }

Looks good.  I'd like to merge this for QEMU 1.7.  QEMU 1.6 is in hard
freeze right now and we cannot add new features.

In order to merge it into the net-next tree this hunk needs to be moved
from PC_COMPAT_1_5 to PC_COMPAT_1_6 (does not exist yet).  Please
introduce PC_COMPAT_1_6 in include/hw/i386/pc.h (and also update
hw/i386/pc_piix.c and hw/i386/pc_q35.c machine types) in a separate
commit.

Stefan



reply via email to

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