From patchwork Wed Feb 7 00:26:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 870153 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zbhwC5YTLz9s1h for ; Wed, 7 Feb 2018 11:26:50 +1100 (AEDT) Received: from localhost ([::1]:54413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejDZX-0007L7-Tw for incoming@patchwork.ozlabs.org; Tue, 06 Feb 2018 19:26:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejDZ0-0007JI-C2 for qemu-devel@nongnu.org; Tue, 06 Feb 2018 19:26:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejDYx-0004ZS-7d for qemu-devel@nongnu.org; Tue, 06 Feb 2018 19:26:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47834) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ejDYx-0004XP-1Q for qemu-devel@nongnu.org; Tue, 06 Feb 2018 19:26:11 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 12E7581DFA; Wed, 7 Feb 2018 00:26:10 +0000 (UTC) Received: from gimli.home (ovpn-117-203.phx2.redhat.com [10.3.117.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id B13535D6A8; Wed, 7 Feb 2018 00:26:07 +0000 (UTC) From: Alex Williamson To: qemu-devel@nongnu.org Date: Tue, 06 Feb 2018 17:26:07 -0700 Message-ID: <20180207001615.1156.10547.stgit@gimli.home> User-Agent: StGit/0.18-102-gdf9f MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 07 Feb 2018 00:26:10 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC PATCH 0/5] vfio: ioeventfd support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.williamson@redhat.com, kvm@vger.kernel.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" For the matching kernel patch, see: https://lkml.org/lkml/2018/2/6/866 This series enables ioeventfd support and makes use of a proposed vfio kernel ioeventfd interface for accelerating high frequency writes through to the device. In the specific case addressed, the writes are to a range of MMIO space virtualized in QEMU for NVIDIA GeForce support, but which also hosts a register which is used to allow the MSI interrupt for the device to re-trigger. Applications which generate a very high interrupt rate on the GPU can see noticeable overhead as a result of this trap through QEMU. We added an option for users to disable these quirks entirely for non-Geforce cards[1] for optimal performance, but for GeForce users and users that can't tweak their VM config, this gets us to within 95% of that performance for an interrupt intensive micro-benchmark (from 83%). I'd be interested in more typical benchmark results to understand if there's an improvement there as well. Thanks, Alex [1] https://lists.gnu.org/archive/html/qemu-devel/2018-01/msg06878.html --- Alex Williamson (5): vfio/quirks: Add common quirk alloc helper vfio/quirks: Add generic support for ioveventfds vfio/quirks: Automatic ioeventfd enabling for NVIDIA BAR0 quirks vfio: Update linux header vfio/quirks: Enable ioeventfd quirks to be handled by vfio directly hw/vfio/pci-quirks.c | 184 +++++++++++++++++++++++++++++++++++++------- hw/vfio/pci.h | 13 +++ linux-headers/linux/vfio.h | 24 ++++++ 3 files changed, 192 insertions(+), 29 deletions(-)