From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VimAt-0005vK-OK for qemu-devel@nongnu.org; Tue, 19 Nov 2013 09:21:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VimAj-0005gy-LJ for qemu-devel@nongnu.org; Tue, 19 Nov 2013 09:21:07 -0500 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:40392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VimAj-0005gq-5Y for qemu-devel@nongnu.org; Tue, 19 Nov 2013 09:20:57 -0500 Received: by mail-wi0-f173.google.com with SMTP id c19so704868wiw.0 for ; Tue, 19 Nov 2013 06:20:56 -0800 (PST) Date: Tue, 19 Nov 2013 15:20:53 +0100 From: Stefan Hajnoczi Message-ID: <20131119142053.GC3202@stefanha-thinkpad.redhat.com> References: <20131118150340.GA4083@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] dataplane, thread and gpu stuff List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Dave Airlie , qemu-devel On Mon, Nov 18, 2013 at 08:18:47AM -0800, Anthony Liguori wrote: > On Nov 18, 2013 7:05 AM, "Stefan Hajnoczi" wrote: > > > > On Mon, Nov 18, 2013 at 02:52:53PM +1000, Dave Airlie wrote: > > > So after talking to a few people at kvm forum I think the GPU code > > > should probably use the dataplane stuff from the outset, > > > > > > The main advantages I think this gives me is being able to dequeue > > > objects from the vq from a thread and send irq vectors from there as > > > well. > > > > > > Though since it appears the dataplane stuff is kvm specific (at least > > > the irq handling), I was wondering how I should deal with fallbacks > > > for non-kvm operation, and quite how much falling back I need to do. > > > > > > Can I still use the dataplane/vring code from the normal bottom half > > > handlers or do I have to write separate code for both situations. > > > > As of today, there are still two vring implementations in > > hw/virtio/virtio.c and hw/virtio/dataplane/vring.c. This means it isn't > > clean and easy to integrate into a new device yet. Existing dataplane > > devices basically take advantage of the fact that the non-dataplane > > version sets up the device before I/O. > > I think we also need some form of mdroth's GContext prior to introducing > more dataplane devices. Sticking every device in a seperate thread with no > way to control who is where can actually hurt performance. I think we > really need to have a M-N device thread model too. Yes, I agree. We need the concept of multiple event loops (QContext). Stefan