Received: from eggs.gnu.org ([208.118.235.92]:46870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtHCi-00066p-FD for qemu-devel@nongnu.org; Thu, 10 Jan 2013 07:25:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtHCh-0001Kv-77 for qemu-devel@nongnu.org; Thu, 10 Jan 2013 07:25:52 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:59661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtHCg-0001Km-TO for qemu-devel@nongnu.org; Thu, 10 Jan 2013 07:25:51 -0500 Received: by mail-wi0-f179.google.com with SMTP id o1so265759wic.6 for ; Thu, 10 Jan 2013 04:25:50 -0800 (PST) Date: Thu, 10 Jan 2013 13:25:48 +0100 From: Stefan Hajnoczi Message-ID: <20130110122548.GB30946@stefanha-thinkpad.redhat.com> References: <20121227100658.GB48891@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121227100658.GB48891@onelab2.iet.unipi.it> Subject: Re: [Qemu-devel] [RFC] updated e1000 mitigation patch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luigi Rizzo Cc: Giuseppe Lettieri , qemu-devel@nongnu.org, v.maffione@gmail.com On Thu, Dec 27, 2012 at 11:06:58AM +0100, Luigi Rizzo wrote: > diff -urp qemu-1.3.0-orig/hw/e1000.c qemu-1.3.0/hw/e1000.c > --- qemu-1.3.0-orig/hw/e1000.c 2012-12-03 20:37:05.000000000 +0100 > +++ qemu-1.3.0/hw/e1000.c 2012-12-27 09:47:16.000000000 +0100 > @@ -35,6 +35,8 @@ > > #include "e1000_hw.h" > > +static int mit_on = 1; /* interrupt mitigation enable */ If you want to make this optional then please put it inside E1000State so it can be toggled per NIC. If you don't want to make it optional then please post results for recent Linux and Windows guests to show that out-of-the-box performance is not degraded. > #define E1000_DEBUG > > #ifdef E1000_DEBUG > @@ -129,6 +131,9 @@ typedef struct E1000State_st { > } eecd_state; > > QEMUTimer *autoneg_timer; > + QEMUTimer *mit_timer; // handle for the timer > + uint32_t mit_timer_on; // mitigation timer active > + uint32_t mit_cause; // pending interrupt cause Live migration support is required so that pending interrupts are migrated. We cannot lose interrupts across live migration. I would migrate mit_cause but not mit_timer_on. When loading (resuming from live migration), look at mit_cause and raise any interrupts. Stefan