From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMCi3-00058z-V3 for qemu-devel@nongnu.org; Fri, 13 Feb 2015 04:38:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMCi0-0000Od-Oo for qemu-devel@nongnu.org; Fri, 13 Feb 2015 04:38:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMCi0-0000OX-H1 for qemu-devel@nongnu.org; Fri, 13 Feb 2015 04:38:48 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1D9clhV019094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 13 Feb 2015 04:38:48 -0500 Message-ID: <54DDC623.8000307@redhat.com> Date: Fri, 13 Feb 2015 10:38:43 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1423718462-25566-1-git-send-email-famz@redhat.com> <1423718462-25566-4-git-send-email-famz@redhat.com> <54DCB8DE.4090302@redhat.com> <20150213012129.GA20581@ad.nay.redhat.com> In-Reply-To: <20150213012129.GA20581@ad.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/3] virtio-scsi-dataplane: Use main thread BH to set BDS' aio context List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On 13/02/2015 02:21, Fam Zheng wrote: >> Could you just do set_aio_context for all devices when starting >> dataplane? For example with a new scsi_device_set_aio_context function >> (and a new method in SCSIDeviceClass). >> >> Maybe I'm missing the obvious. :) > > Per VQ IOThread stills needs it, in the case that guest switches the VQ of a > disk on the fly. Per VQ iothread is far away though. Multiqueue aims at parallelizing accesses *to the same disk from different CPUs*, not at parallelizing accesses to different disks. As long as bdrv_set_aio_context does bdrv_drain_all, something has to change for multiqueue dataplane: either stop using bdrv_set_aio_context, or stop doing bdrv_drain_all. In either case, the changes are large enough that we shouldn't code for a case that doesn't exist yet. In addition, making the code more similar for virtio-blk and virtio-scsi dataplane is good, because the same changes can apply to both in the future. Paolo