From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2dKX-0001yc-Nv for qemu-devel@nongnu.org; Fri, 04 Nov 2016 08:10:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2dKU-0003Uq-Jp for qemu-devel@nongnu.org; Fri, 04 Nov 2016 08:10:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53536) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2dKU-0003Te-E4 for qemu-devel@nongnu.org; Fri, 04 Nov 2016 08:10:42 -0400 Date: Fri, 4 Nov 2016 20:10:39 +0800 From: Fam Zheng Message-ID: <20161104121039.GA6018@lemon> References: <1476864290-6129-1-git-send-email-famz@redhat.com> <20161104105804.GE9817@stefanha-x1.localdomain> <20161104110315.GG32673@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161104110315.GG32673@redhat.com> Subject: Re: [Qemu-devel] [PATCH RFC] iothread: Add "spawns" property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Stefan Hajnoczi , pbonzini@redhat.com, qemu-devel@nongnu.org On Fri, 11/04 11:03, Daniel P. Berrange wrote: > On Fri, Nov 04, 2016 at 10:58:04AM +0000, Stefan Hajnoczi wrote: > > On Wed, Oct 19, 2016 at 04:04:50PM +0800, Fam Zheng wrote: > > > The option specifies how many threads to spawn under the iothread > > > object. All threads share the same AioContext so they can safely run > > > (contend) together. > > > > > > With AioContext going away, the spawns will natually enable the block > > > multi-queue work. > > > > > > Signed-off-by: Fam Zheng > > > > > > --- > > > > > > Based on v2 of Paolo's RFifoLock removal series, with which the > > > symmetric contention on the single AioContext is no longer a busy > > > preempt loop. > > > --- > > > include/sysemu/iothread.h | 19 ++++-- > > > iothread.c | 148 ++++++++++++++++++++++++++++++++++------------ > > > 2 files changed, 125 insertions(+), 42 deletions(-) > > > > I'm not happy with "IOThread" becoming a group of threads. IOThread > > should stay the way it is. Instead you should add a new object type > > that simply groups IOThreads for convenient assignment to devices, e.g. > > IOThreadGroup. Then multiqueue devices can use an IOThreadGroup to work > > inside multiple IOThreads. > > Do we even need a IOThreadGroup object ? Can't we just explicitly pass > a list of IOThread object IDs to the device. eg something like > > -device virtio-blk-pci,iothread=t1,iothread=t2,iothread=t3 Is that a supported syntax by qdev/QOM? Fam