From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rajesh Shah Subject: Re: [PATCH 8/25] msi: Simplify the msi irq limit policy. Date: Tue, 20 Jun 2006 18:28:38 -0700 Message-ID: <20060620182838.E10402@unix-os.sc.intel.com> References: <11508425183073-git-send-email-ebiederm@xmission.com> <11508425191381-git-send-email-ebiederm@xmission.com> <11508425192220-git-send-email-ebiederm@xmission.com> <11508425191063-git-send-email-ebiederm@xmission.com> <1150842520235-git-send-email-ebiederm@xmission.com> <11508425201406-git-send-email-ebiederm@xmission.com> <1150842520775-git-send-email-ebiederm@xmission.com> <11508425213394-git-send-email-ebiederm@xmission.com> Reply-To: Rajesh Shah Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga05.intel.com ([192.55.52.89]:5987 "EHLO fmsmga101.fm.intel.com") by vger.kernel.org with ESMTP id S932451AbWFUBgi (ORCPT ); Tue, 20 Jun 2006 21:36:38 -0400 Content-Disposition: inline In-Reply-To: <11508425213394-git-send-email-ebiederm@xmission.com>; from ebiederm@xmission.com on Tue, Jun 20, 2006 at 04:28:21PM -0600 Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Eric W. Biederman" Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz, discuss@x86-64.org, Ingo Molnar , Thomas Gleixner , Andi Kleen , Natalie Protasevich , Len Brown , Kimball Murray , Brice Goglin , Greg Lindahl , Dave Olson , Jeff Garzik , Greg KH , Grant Grundler , "bibo,mao" , Rajesh Shah , Mark Maule , Jesper Juhl , Shaohua Li , Matthew Wilcox , "Michael S. Tsirkin" , Ashok Raj , Randy Dunlap On Tue, Jun 20, 2006 at 04:28:21PM -0600, Eric W. Biederman wrote: > Currently we attempt to predict how many irqs we will be > able to allocate with msi using pci_vector_resources and some > complicated accounting, and then we only allow each device > as many irqs as we think are available on average. > > Only the s2io driver even takes advantage of this feature > all other drivers have a fixed number of irqs they need and > bail if they can't get them. > > pci_vector_resources is inaccurate if anyone ever frees an irq. > The whole implmentation is racy. The current irq limit policy > does not appear to make sense with current drivers. So I have > simplified things. We can revisit this we we need a more sophisticated > policy. > > Signed-off-by: Eric W. Biederman > --- > arch/i386/pci/irq.c | 30 ----------------------------- > arch/ia64/pci/pci.c | 9 --------- > drivers/pci/msi.c | 53 ++++++++------------------------------------------- > drivers/pci/msi.h | 11 ----------- > 4 files changed, 8 insertions(+), 95 deletions(-) > > diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c > index 40499c0..772f5b6 100644 > --- a/drivers/pci/msi.c > +++ b/drivers/pci/msi.c > > @@ -542,11 +540,6 @@ void pci_scan_msi_device(struct pci_dev > { > if (!dev) > return; > - > - if (pci_find_capability(dev, PCI_CAP_ID_MSIX) > 0) > - nr_msix_devices++; > - else if (pci_find_capability(dev, PCI_CAP_ID_MSI) > 0) > - nr_reserved_vectors++; > } Actually, why not just eliminate this function and the corresponding call from probe.c? It does nothing useful with all the vector tracking gone from generic MSI code. Rajesh