From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 0/5] kvm-unittests: add pci PORT IO and MMIO speed tests Date: Sun, 14 Apr 2013 17:51:03 +0300 Message-ID: <20130414145103.GS17919@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, pbonzini@redhat.com, mtosatti@redhat.com To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:27219 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751824Ab3DNOvF (ORCPT ); Sun, 14 Apr 2013 10:51:05 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3EEp4ka027185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 14 Apr 2013 10:51:04 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Apr 03, 2013 at 11:52:19AM +0300, Michael S. Tsirkin wrote: > These patches add ability to measure speed of MMIO versus PIO, in > different configurations. As I didn't want to reserve a hardcoded range > of memory, I added pci bus scan support instead. Used together with the > new pci-testdev backend. When not present, the new tests are skipped. > > Example output: > mmio-no-eventfd:pci-mem 8796 > mmio-wildcard-eventfd:pci-mem 3609 > mmio-datamatch-eventfd:pci-mem 3685 > portio-no-eventfd:pci-io 5287 > portio-wildcard-eventfd:pci-io 1762 > portio-datamatch-eventfd:pci-io 1777 > > First interesting conclusion is that the overhead of MMIO > exit to QEMU as compared to PIO is double that of > MMIO ioeventfd as compared to PIO eventfd. Is this a known fact? > Looks fine to me. Will apply when QEMU part will land in upstream. > Michael S. Tsirkin (5): > kvm-unittest: add printf %c support > kvm-unittest: libcflat: add offsetof > libcflat.h: define NULL > lib: add pci bus scan support > vmexit: add pci io and memory speed tests > > config-x86-common.mak | 1 + > lib/libcflat.h | 3 + > lib/printf.c | 3 + > lib/x86/pci.c | 55 ++++++++++++ > lib/x86/pci.h | 16 ++++ > x86-run | 13 ++- > x86/vmexit.c | 226 +++++++++++++++++++++++++++++++++++++++++++++++--- > 7 files changed, 302 insertions(+), 15 deletions(-) > create mode 100644 lib/x86/pci.c > create mode 100644 lib/x86/pci.h > > -- > MST -- Gleb.