From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c74ys-0008TY-Sx for qemu-devel@nongnu.org; Wed, 16 Nov 2016 13:30:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c74yo-0004Mc-MO for qemu-devel@nongnu.org; Wed, 16 Nov 2016 13:30:46 -0500 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33857) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c74yo-0004MF-9q for qemu-devel@nongnu.org; Wed, 16 Nov 2016 13:30:42 -0500 Received: by mail-wm0-x241.google.com with SMTP id g23so13913084wme.1 for ; Wed, 16 Nov 2016 10:30:42 -0800 (PST) Sender: Paolo Bonzini References: <1479318422-10979-1-git-send-email-stefanha@redhat.com> <1479318422-10979-3-git-send-email-stefanha@redhat.com> From: Paolo Bonzini Message-ID: <2e8fa643-3b03-cde2-1a78-aeaac511f636@redhat.com> Date: Wed, 16 Nov 2016 19:30:38 +0100 MIME-Version: 1.0 In-Reply-To: <1479318422-10979-3-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/4] aio: add polling mode to AioContext List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: borntraeger@de.ibm.com, Karl Rister , Fam Zheng On 16/11/2016 18:47, Stefan Hajnoczi wrote: > + if (max_ns && run_poll_handlers(ctx, max_ns)) { > + atomic_sub(&ctx->notify_me, 2); > + blocking = false; /* poll again, don't block */ You don't need to poll---you only need to run bottom halves and timers. Paolo > + progress = true; > + } > + }