From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: APIC lookups Date: Fri, 02 Sep 2011 21:07:31 +0300 Message-ID: <1314986851.31676.23.camel@lappy> References: <1314986155.31676.22.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm Return-path: Received: from mail-wy0-f174.google.com ([74.125.82.174]:39259 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754147Ab1IBSHm (ORCPT ); Fri, 2 Sep 2011 14:07:42 -0400 Received: by wyh22 with SMTP id 22so2163260wyh.19 for ; Fri, 02 Sep 2011 11:07:40 -0700 (PDT) In-Reply-To: <1314986155.31676.22.camel@lappy> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 2011-09-02 at 20:55 +0300, Sasha Levin wrote: > Hi, > > I've noticed that kvm_irq_delivery_to_apic() is locating the destination > APIC by running through kvm_for_each_vcpu() which becomes a scalability > issue with a large number if vcpus. > > I'm thinking about speeding that up using a radix tree for lookups, and > was wondering if it sounds right. > Can also go with a simple sorted array since APIC id is limited to 8 bits, but it might need to change if we plan on supporting more than 254 vcpus in the future. -- Sasha.