From: Stefan Hajnoczi Subject: [PATCH v2 0/3] virtio: Use ioeventfd for virtqueue notify Date: Thu, 11 Nov 2010 13:47:19 +0000 Message-ID: <1289483242-6069-1-git-send-email-stefanha@linux.vnet.ibm.com> Cc: , "Michael S. Tsirkin" To: Return-path: Received: from mtagate7.uk.ibm.com ([194.196.100.167]:43862 "EHLO mtagate7.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756159Ab0KKNrh (ORCPT ); Thu, 11 Nov 2010 08:47:37 -0500 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate7.uk.ibm.com (8.13.1/8.13.1) with ESMTP id oABDlZrv004699 for ; Thu, 11 Nov 2010 13:47:35 GMT Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oABDlbKa2728168 for ; Thu, 11 Nov 2010 13:47:37 GMT Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oABDlYr6015814 for ; Thu, 11 Nov 2010 06:47:35 -0700 Sender: kvm-owner@vger.kernel.org List-ID: This is a rewrite of the virtio-ioeventfd patchset to work at the virtio-pci.c level instead of virtio.c. This results in better integration with the host/guest notifier code and makes the code simpler (no more state machine). Virtqueue notify is currently handled synchronously in userspace virtio. This prevents the vcpu from executing guest code while hardware emulation code handles the notify. On systems that support KVM, the ioeventfd mechanism can be used to make virtqueue notify a lightweight exit by deferring hardware emulation to the iothread and allowing the VM to continue execution. This model is similar to how vhost receives virtqueue notifies. The result of this change is improved performance for userspace virtio devices. Virtio-blk throughput increases especially for multithreaded scenarios and virtio-net transmit throughput increases substantially. Now that this code is in virtio-pci.c it is possible to explicitly enable devices for which virtio-ioeventfd should be used. Only virtio-blk and virtio-net are enabled at this time.