From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aifBV-0001fK-F9 for qemu-devel@nongnu.org; Wed, 23 Mar 2016 05:34:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aifBP-0004gA-JR for qemu-devel@nongnu.org; Wed, 23 Mar 2016 05:34:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aifBP-0004g6-E0 for qemu-devel@nongnu.org; Wed, 23 Mar 2016 05:34:31 -0400 Date: Wed, 23 Mar 2016 17:34:25 +0800 From: Fam Zheng Message-ID: <20160323093425.GA13240@ad.usersys.redhat.com> References: <1458208893-15949-1-git-send-email-cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1458208893-15949-1-git-send-email-cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH RFC 0/6] virtio: refactor host notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , borntraeger@de.ibm.com Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com On Thu, 03/17 11:01, Cornelia Huck wrote: > As discussed in the virtio-blk dataplane start/stop thread, the > various transports contain a lot of similar/identical boilerplate > code for setting up ioeventfds. This makes the code hard to follow. > > Let's drag all of the common handling into the virtio-bus layer, > hopefully reducing both the boilerplate code and the number of > indirections. > > This RFC patchset is the result of hacking this up quickly, and I > was rather surprised that it did not die immediately on my s390 > system (which is all I 'tested'). So be warned :) > > Feedback about the approach and the interface would be good. I tested this series with the two assertions (Paolo's "test" reentrancy detection and my "assert(is_in_iothread())", in virtio-blk request handler), and it seems to fix the crash . (A few seconds to crash on master vs. several hours survival). Fam > > Cornelia Huck (6): > virtio-bus: common ioeventfd infrastructure > virtio-bus: have callers tolerate new host notifier api > virtio-ccw: convert to ioeventfd callbacks > virtio-pci: convert to ioeventfd callbacks > virtio-mmio: convert to ioeventfd callbacks > virtio-bus: remove old set_host_notifier callback > > hw/block/dataplane/virtio-blk.c | 6 +- > hw/s390x/virtio-ccw.c | 133 ++++++++++++++-------------------------- > hw/scsi/virtio-scsi-dataplane.c | 9 ++- > hw/virtio/vhost.c | 13 ++-- > hw/virtio/virtio-bus.c | 108 ++++++++++++++++++++++++++++++++ > hw/virtio/virtio-mmio.c | 128 +++++++++++++------------------------- > hw/virtio/virtio-pci.c | 124 +++++++++++++------------------------ > include/hw/virtio/virtio-bus.h | 15 ++++- > 8 files changed, 263 insertions(+), 273 deletions(-) > > -- > 2.6.5 >