From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWnyN-0007Z1-Jz for qemu-devel@nongnu.org; Tue, 22 May 2012 08:13:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWnyL-0000pS-Rt for qemu-devel@nongnu.org; Tue, 22 May 2012 08:13:55 -0400 Received: from plane.gmane.org ([80.91.229.3]:50687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWnyL-0000pG-LI for qemu-devel@nongnu.org; Tue, 22 May 2012 08:13:53 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SWnyJ-0004zg-CW for qemu-devel@nongnu.org; Tue, 22 May 2012 14:13:51 +0200 Received: from 93-34-182-16.ip50.fastwebnet.it ([93.34.182.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 May 2012 14:13:51 +0200 Received: from pbonzini by 93-34-182-16.ip50.fastwebnet.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 May 2012 14:13:51 +0200 From: Paolo Bonzini Date: Tue, 22 May 2012 14:13:40 +0200 Message-ID: References: <1337680596-8485-1-git-send-email-ronniesahlberg@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit In-Reply-To: <1337680596-8485-1-git-send-email-ronniesahlberg@gmail.com> Subject: Re: [Qemu-devel] [PATCH] ISCSI: We need to call qemu_notify_event() everytime we update which events we need to be notified for. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Il 22/05/2012 11:56, Ronnie Sahlberg ha scritto: > Otherwise, If we add an event for -is-writeable but the socket is already writeable there may be a short delay before the event callback is actually triggered. > > Those delays would in particular hurt performance during BIOS boot and when the GRUB bootloader reads the kernel and initrd. > > Signed-off-by: Ronnie Sahlberg > --- > block/iscsi.c | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/block/iscsi.c b/block/iscsi.c > index d37c4ee..f956824 100644 > --- a/block/iscsi.c > +++ b/block/iscsi.c > @@ -109,6 +109,13 @@ iscsi_set_events(IscsiLun *iscsilun) > (iscsi_which_events(iscsi) & POLLOUT) > ? iscsi_process_write : NULL, > iscsi_process_flush, iscsilun); > + > + /* If we just added the event for writeable we must call > + and the socket is already writeable the callback might > + not be invoked until after a short delay unless we call > + qemu_notify_event(). > + */ > + qemu_notify_event(); > } > > static void Thanks, applied to SCSI branch for 1.1. Paolo