From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPTUS-0002mq-8D for qemu-devel@nongnu.org; Tue, 19 Jul 2016 07:47:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPTUP-0003p3-52 for qemu-devel@nongnu.org; Tue, 19 Jul 2016 07:47:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPTUO-0003oz-Us for qemu-devel@nongnu.org; Tue, 19 Jul 2016 07:47:05 -0400 References: <1468923921-24868-1-git-send-email-roman.penyaev@profitbricks.com> <1468923921-24868-4-git-send-email-roman.penyaev@profitbricks.com> <89cdbaae-9c8c-dda9-6574-84d3633e4a1c@redhat.com> From: Paolo Bonzini Message-ID: Date: Tue, 19 Jul 2016 13:47:00 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/3] linux-aio: process completions from ioq_submit() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Roman Penyaev Cc: Stefan Hajnoczi , qemu-devel On 19/07/2016 13:44, Roman Penyaev wrote: >>> >> >>> >> Can this leave I/O stuck if in_queue > 0 && in_flight == 0 after the >>> >> return from qemu_laio_process_completions? I think you need to goto the >>> >> beginning of the function to submit more I/O requests in that case. > Not quite. I still leave '&s->e' as set, so we will return in a generic > qemu_laio_completion_cb(), will do 'event_notifier_test_and_clear(&s->e)' > and again will process events with normal submission. > > IMHO this is better variant than spinning inside ioq_submit doing goto. > We do not occupy the whole events processing for our IO needs and give > a chance to complete other stuff. But of course this is guts feeling > and I do not have any serious numbers. That's fine as long as it doesn't hang. :) Paolo