From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs Date: Wed, 13 May 2009 12:47:38 +0300 Message-ID: <4A0A973A.9020502@redhat.com> References: <20090512220142.5663.72948.stgit@dl380g6-3.ned.telco.ned.telco> <20090513043835.6696.27384.stgit@dl380g6-3.ned.telco.ned.telco> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, sheng.yang@intel.com, mst@redhat.com To: Alex Williamson Return-path: Received: from mx2.redhat.com ([66.187.237.31]:56054 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753990AbZEMJsK (ORCPT ); Wed, 13 May 2009 05:48:10 -0400 In-Reply-To: <20090513043835.6696.27384.stgit@dl380g6-3.ned.telco.ned.telco> Sender: kvm-owner@vger.kernel.org List-ID: Alex Williamson wrote: > We're currently using a counter to track the most recent GSI we've > handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device > assignment with a driver that regularly toggles the MSI enable bit. > This can mean only a few minutes of usable run time. Instead, track > used GSIs in a bitmap. > > Signed-off-by: Alex Williamson > --- > > v2: Added mutex to protect gsi bitmap > Why is the mutex needed? We already have mutex protection in qemu. How often does the driver enable/disable the MSI (and, do you now why)? If it's often enough it may justify kernel support. (We'll need this patch in any case for kernels without this new support). -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.