From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tokarev Subject: Re: block virtio excessive VIRTIO_PCI_ISR reads Date: Wed, 28 Oct 2009 17:59:33 +0300 Message-ID: <4AE85C55.7010806@msgid.tls.msk.ru> References: <41be791c0910280740t7942bb7cj692ba54725bcc5eb@mail.gmail.com> <4AE859BD.106@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Saul Tamari , kvm To: Anthony Liguori Return-path: Received: from isrv.corpit.ru ([81.13.33.159]:39143 "EHLO isrv.corpit.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752062AbZJ1O7b (ORCPT ); Wed, 28 Oct 2009 10:59:31 -0400 In-Reply-To: <4AE859BD.106@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori wrote: > Saul Tamari wrote: >> Hi, >> >> There seems to be a bug in the VirtIO guest device driver (tested wi= th >> 2.6.31.5 kernel). >> The bug causes frequent & excessive VIRTIO_PCI_ISR reads (causing PI= O >> vm-exits) for a device that is not being used. >> >> The setup I=92m using includes two VirtIO block devices =96 vda & vd= b. >> 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=20 >> driver 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. >=20 > You can eliminate this by using MSI-x. So the next question is how to use MSI-x.. ;) Thanks! /mjt