From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v4] IO: Intelligent device lookup on bus Date: Thu, 28 Jul 2011 12:21:46 +0300 Message-ID: <4E312A2A.7050206@redhat.com> References: <1311771648-4125-1-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Marcelo Tosatti To: Sasha Levin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57489 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753057Ab1G1JVu (ORCPT ); Thu, 28 Jul 2011 05:21:50 -0400 In-Reply-To: <1311771648-4125-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/27/2011 04:00 PM, Sasha Levin wrote: > Currently the method of dealing with an IO operation on a bus (PIO/MMIO) > is to call the read or write callback for each device registered > on the bus until we find a device which handles it. > > Since the number of devices on a bus can be significant due to ioeventfds > and coalesced MMIO zones, this leads to a lot of overhead on each IO > operation. > > Instead of registering devices, we now register ranges which points to > a device. Lookup is done using an efficient bsearch instead of a linear > search. > > Performance test was conducted by comparing exit count per second with > 200 ioeventfds created on one byte and the guest is trying to access a > different byte continuously (triggering usermode exits). > Before the patch the guest has achieved 259k exits per second, after the > patch the guest does 274k exits per second. > Applied, thanks. -- error compiling committee.c: too many arguments to function