Received: from eggs.gnu.org ([2001:4830:134:3::10]:53126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2GBq-0005vA-Vn for qemu-devel@nongnu.org; Mon, 16 May 2016 06:56:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2GBl-0006oz-4Y for qemu-devel@nongnu.org; Mon, 16 May 2016 06:55:57 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:35584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2GBk-0006ot-U0 for qemu-devel@nongnu.org; Mon, 16 May 2016 06:55:53 -0400 Received: by mail-wm0-x232.google.com with SMTP id e201so95984348wme.0 for ; Mon, 16 May 2016 03:55:52 -0700 (PDT) Date: Mon, 16 May 2016 13:55:48 +0300 From: Shmulik Ladkani Message-ID: <20160516135548.7548d55b@pixies> In-Reply-To: References: <1458200278-11940-1-git-send-email-sameeh@daynix.com> <1458200278-11940-2-git-send-email-sameeh@daynix.com> <20160504143459.69178f46@pixies> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] e1000: Fixing interrupts pace. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sameeh Jubran Cc: qemu-devel@nongnu.org, Jason Wang , Dmitry Fleytman , Yan Vugenfirer Hi, On Mon, 16 May 2016 08:58:32 +0300, sameeh@daynix.com wrote: > This means that on a real hardware when mit_delay==0 ( don't use the timer > ) the Ethernet controller guarantees a maximum > observable interrupt rate of 7813 interrupts/sec. Unfortunately that isn't > the case in the emulated device and the interrupt > rate bypass the rate of the real hardware which could lead to an interrupt > storm. Setting mit_delay to 500 guarantees a maximum > interrupt rate of 7813 interrupts/sec. OK, if that is the case, then > > > + mit_delay = (mit_delay < 500) ? 500 : mit_delay; > > > + > > > if (mit_delay) { > > > s->mit_timer_on = 1; > > > timer_mod(s->mit_timer, The existing 'if (mit_delay)' is now superflous, since always true, hence can be removed.