From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw43e-0003Rq-NM for qemu-devel@nongnu.org; Mon, 17 Oct 2016 05:18:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bw43d-0003Cb-P9 for qemu-devel@nongnu.org; Mon, 17 Oct 2016 05:18:10 -0400 Date: Mon, 17 Oct 2016 05:17:58 -0400 (EDT) From: Paolo Bonzini Message-ID: <268115544.3963114.1476695878169.JavaMail.zimbra@redhat.com> In-Reply-To: <008ad711-fa2a-32d5-832e-e93508a06807@de.ibm.com> References: <1476380062-18001-1-git-send-email-pbonzini@redhat.com> <008ad711-fa2a-32d5-832e-e93508a06807@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 00/18] dataplane: remove RFifoLock (including almost all previously sent patches) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: qemu-devel@nongnu.org, kwolf@redhat.com, famz@redhat.com, stefanha@redhat.com, qemu-block@nongnu.org > On 10/13/2016 07:34 PM, Paolo Bonzini wrote: > > This patch reorganizes aio_poll callers to establish new rules for > > dataplane locking. The idea is that I/O operations on a dataplane > > BDS (i.e. one where the AioContext is not the main one) do not call > > aio_poll anymore. Instead, they wait for the operation to end in the > > other I/O thread, at which point the other I/O thread calls bdrv_wakeup > > to wake up the main thread. > > > > With this change, only one thread runs aio_poll for an AioContext. > > While aio_context_acquire/release is still needed to protect the BDSes, > > it need not interrupt the other thread's event loop anymore, and therefore > > it does not need contention callbacks anymore. Thus the patch can remove > > RFifoLock. This fixes possible hangs in bdrv_drain_all, reproducible (for > > example) by unplugging a virtio-scsi-dataplane device while there is I/O > > going on for a virtio-blk-dataplane on the same I/O thread. > > Have you seen improvements or deteriorations in performance with single disks > or multiple disks? Is there a branch? I will prepare a branch for v2. This should have no performance effect. The affected code only runs during QMP operations such as live snapshots or completing a block job. Paolo