Received: from eggs.gnu.org ([2001:4830:134:3::10]:49806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzOkQ-0008DX-MU for qemu-devel@nongnu.org; Thu, 19 Nov 2015 07:55:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzOkN-0000pN-Bp for qemu-devel@nongnu.org; Thu, 19 Nov 2015 07:55:34 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:38504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzOkM-0000pI-WB for qemu-devel@nongnu.org; Thu, 19 Nov 2015 07:55:31 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Nov 2015 12:55:29 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id DF9DA17D8056 for ; Thu, 19 Nov 2015 12:55:41 +0000 (GMT) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tAJCtJ0n48496754 for ; Thu, 19 Nov 2015 12:55:19 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tAJBtKbn018919 for ; Thu, 19 Nov 2015 04:55:20 -0700 Date: Thu, 19 Nov 2015 13:55:16 +0100 From: Cornelia Huck Message-ID: <20151119135516.67948855.cornelia.huck@de.ibm.com> In-Reply-To: <014e01d122c4$54073d30$fc15b790$@samsung.com> References: <011b01d122af$c60f7ce0$522e76a0$@samsung.com> <20151119125348-mutt-send-email-mst@redhat.com> <014b01d122bf$ab73dc90$025b95b0$@samsung.com> <20151119135725-mutt-send-email-mst@redhat.com> <564DBB39.3010207@redhat.com> <014e01d122c4$54073d30$fc15b790$@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Fedin Cc: qemu-devel@nongnu.org, 'Paolo Bonzini' , 'Christian Borntraeger' , "'Michael S. Tsirkin'" On Thu, 19 Nov 2015 15:17:57 +0300 Pavel Fedin wrote: > Hello! > > > > Paolo, do you see anything wrong with making > > > memory_region_add_eventfd work (slowly) without kvm ioeventfd support? > > > > > > > Sure, it's even been on the todo list for a while. Stefan Hajnoczi had > > a patch, the only ugly thing was that it slowed down a little all > > non-ioeventfd accesses, but I guess that's okay because it's probably > > not measurable. > > > > http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg04710.html If I read this correctly, memory regions already keep track of ioeventfds and this patch can simply trigger them manually if that had not already been done? > > Ok, good. So, this has already been tested. Ok, i think i can further extend this patch by: > 1. Add a flag to disable memory_region_dispatch_write_ioeventfds(), to be set by KVM code for example. So that with KVM we have even > smaller performance degradation. > 2. Issue a one-shot warning, like in my current patch, so that the user knows that his/her kernel prevents from getting the best > performance. > Will it be OK then? > > Cc'ed also Cornelia because he's taking part in CCW discussion. And the same kind of generic event forwarding could be implemented > for CCW then. Only that we don't have such a nice tracking structure that memory regions already have. The intercept handler for diagnose 500 already ends up at the correct device (its id is one of the parameters), so I'd need to check for an existing notifier on the virtqueue and trigger that instead of calling virtio_queue_notify directly?