From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGfdK-0007DN-NY for qemu-devel@nongnu.org; Thu, 20 Feb 2014 21:14:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGfdF-0004ei-OR for qemu-devel@nongnu.org; Thu, 20 Feb 2014 21:14:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGfdF-0004eQ-Gf for qemu-devel@nongnu.org; Thu, 20 Feb 2014 21:14:29 -0500 Message-ID: <1392948847.11930.52.camel@w7-rhel> From: Vadim Rozenfeld Date: Fri, 21 Feb 2014 13:14:07 +1100 In-Reply-To: <1392852328.22195.11.camel@haakon3.risingtidesystems.com> References: <1391804085.1155.60.camel@haakon3.risingtidesystems.com> <693A9682-53BF-4A61-86AB-1F19F1B91B52@redhat.com> <1391945757.27748.32.camel@w7-rhel> <1392059126.17867.12.camel@haakon3.risingtidesystems.com> <1392757259.28946.46.camel@haakon3.risingtidesystems.com> <1392797035.11930.21.camel@w7-rhel> <1392852328.22195.11.camel@haakon3.risingtidesystems.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] MSI interrupt support with vioscsi.c miniport driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Nicholas A. Bellinger" Cc: kvm-devel , "Michael S. Tsirkin" , Yan Vugenfirer , qemu-devel , target-devel , dnk@daterainc.com, Paolo Bonzini On Wed, 2014-02-19 at 15:25 -0800, Nicholas A. Bellinger wrote: > On Wed, 2014-02-19 at 19:03 +1100, Vadim Rozenfeld wrote: > > On Tue, 2014-02-18 at 13:00 -0800, Nicholas A. Bellinger wrote: > > > On Mon, 2014-02-10 at 11:05 -0800, Nicholas A. Bellinger wrote: > > > > > > > > > > > > > > > > Hi Yan, > > > > > > > > > > > > > > So recently I've been doing some KVM guest performance comparisons > > > > > > > between the scsi-mq prototype using virtio-scsi + vhost-scsi, and > > > > > > > Windows Server 2012 with vioscsi.sys (virtio-win-0.1-74.iso) + > > > > > > > vhost-scsi using PCIe flash backend devices. > > > > > > > > > > > > > > I've noticed that small block random performance for the MSFT guest is > > > > > > > at around ~80K IOPs with multiple vioscsi LUNs + adapters, which ends up > > > > > > > being well below what the Linux guest with scsi-mq + virtio-scsi is > > > > > > > capable of (~500K). > > > > > > > > > > > > > > After searching through the various vioscsi registry settings, it > > > > > > > appears that MSIEnabled is being explicitly disabled (0x00000000), that > > > > > > > is different from what vioscsi.inx is currently defining: > > > > > > > > > > > > > > [pnpsafe_pci_addreg_msix] > > > > > > > HKR, "Interrupt Management",, 0x00000010 > > > > > > > HKR, "Interrupt Management\MessageSignaledInterruptProperties",, 0x00000010 > > > > > > > HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 0 > > > > > > > HKR, "Interrupt Management\MessageSignaledInterruptProperties", MessageNumberLimit, 0x00010001, 4 > > > > > > > > > > > > > > Looking deeper at vioscsi.c code, I've noticed that MSI_SUPPORTED=0 is > > > > > > > explicitly disabled at build time in SOURCES + vioscsi.vcxproj, as well > > > > > > > as VioScsiFindAdapter() code always ends setting msix_enabled = FALSE > > > > > > > here, regardless of MSI_SUPPORTED: > > > > > > > > > > > > > > https://github.com/YanVugenfirer/kvm-guest-drivers-windows/blob/master/vioscsi/vioscsi.c#L340 > > > > > > > > > > > > > > Also looking at virtio_stor.c for the raw block driver, MSI_SUPPORTED=1 > > > > > > > appears to be the default setting for the driver included in the offical > > > > > > > virtio-win iso builds, right..? > > > > > > > > > > > > > > Sooo, I'd like to try enabling MSI_SUPPORTED=1 in a test vioscsi.sys > > > > > > > build of my own, but before going down the WDK development rabbit whole, > > > > > > > I'd like to better understand why you've explicitly disabled this logic > > > > > > > within vioscsi.c code to start..? > > > > > > > > > > > > > > Is there anything that needs to be addressed / carried over from > > > > > > > virtio_stor.c in order to get MSI_SUPPORTED=1 to work with vioscsi.c > > > > > > > miniport code..? > > > > > > > > > > Hi Nicholas, > > > > > > > > > > I was thinking about enabling MSI in RHEL 6.6 (build 74) but for some > > > > > reasons decided to keep it disabled until adding mq support. > > > > > > > > > > > > > > > You definitely should be able to turn on MSI_SUPPORTED, rebuild the > > > > > driver, and switch MSISupported to 1 to make vioscsi driver working in > > > > > MSI mode. > > > > > > > > > > > > > Thanks for the quick response. We'll give MSI_SUPPORTED=1 a shot over > > > > the next days with a test build on Server 2012 / Server 2008 R2 and see > > > > how things go.. > > > > > > > > > > Just a quick update on progress. > > > > > > I've been able to successfully build + load a unsigned vioscsi.sys > > > driver on Server 2012 with WDK 8.0. > > > > > > Running with MSI_SUPPORTED=1 against vhost-scsi results in a significant > > > performance and efficiency gain, on the order of 100K to 225K IOPs for > > > 4K block random I/O workload, depending on read/write mix. > > > > > > Below is a simple patch to enable MSI operation by default. Any chance > > > to apply this separate from future mq efforts..? > > > > Yes, we differently can enable MSI and rebuild vioscsi. > > But then we need to re-spin WHQL testing for this particular > > driver. This process requires a lot of resources, and I doubt that > > it will be initiated soon, unless we have some significant amount of > > bug-fixes. > > > > Any idea on a rough time frame to expect an official WHQL build with MSI > enabled..? In June for sure :) > Or, would it be possible to generate some -BETA builds that are at least > signed and don't require extra hoops to jump through for testing..? It's doable. I hope we can make a new build next week. Best regards, Vadim. > > Thanks again, > > --nab > >