From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: block virtio excessive VIRTIO_PCI_ISR reads Date: Wed, 28 Oct 2009 09:48:29 -0500 Message-ID: <4AE859BD.106@codemonkey.ws> References: <41be791c0910280740t7942bb7cj692ba54725bcc5eb@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm To: Saul Tamari Return-path: Received: from mail-pw0-f42.google.com ([209.85.160.42]:36730 "EHLO mail-pw0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754057AbZJ1Osa (ORCPT ); Wed, 28 Oct 2009 10:48:30 -0400 Received: by pwj9 with SMTP id 9so820538pwj.21 for ; Wed, 28 Oct 2009 07:48:34 -0700 (PDT) In-Reply-To: <41be791c0910280740t7942bb7cj692ba54725bcc5eb@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Saul Tamari wrote: > Hi, > > There seems to be a bug in the VirtIO guest device driver (tested wit= h > 2.6.31.5 kernel). > The bug causes frequent & excessive VIRTIO_PCI_ISR reads (causing PIO > vm-exits) for a device that is not being used. > > The setup I=92m using includes two VirtIO block devices =96 vda & vdb= =2E > While running heavy IO on vdb I notice a lot of VIRTIO_PCI_ISR port > reads for the PIO ports of vda too. > For each vdb IO operation passed to the hypervisor by the virtio driv= er I see: > 1. One VIRTIO_PCI_QUEUE_NOTIFY write on vdb > 2. One VIRTIO_PCI_ISR read on vdb > 3. One VIRTIO_PCI_ISR read on vda (while not explicitly using vda) > =20 That's because it's using a shared interrupt and each device needs to=20 check whether it's got pending work to do. You can eliminate this by using MSI-x. Regards, Anthony Liguori