From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Helgaas Subject: Re: [PATCH 02/39] x86, PCI: have own version for pcibios_bus_to_resource Date: Wed, 29 Feb 2012 17:42:36 -0700 Message-ID: References: <1330556858-11768-1-git-send-email-yinghai@kernel.org> <1330556858-11768-3-git-send-email-yinghai@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: Sender: linux-pci-owner@vger.kernel.org To: Yinghai Lu Cc: Jesse Barnes , Benjamin Herrenschmidt , Tony Luck , David Miller , x86 , Dominik Brodowski , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org List-Id: linux-arch.vger.kernel.org On Wed, Feb 29, 2012 at 4:33 PM, Yinghai Lu wrote: > On Wed, Feb 29, 2012 at 3:20 PM, Bjorn Helgaas wrote: >> On Wed, Feb 29, 2012 at 4:07 PM, Yinghai Lu wrote: >>> x86 does not need to offset the address. So we can skip that costing offset >>> searching. >> >> I tried to start a discussion about this patch (and others), but I >> don't think you responded: >> http://marc.info/?l=linux-pci&m=133036414506921&w=2 > > this patch does reduce some not needed ops. > > and it does not affects your effects, It does affect my efforts in that this patch adds back x86 complexity that I don't think is necessary. And this patch makes it so the pci_add_resource_offset() interface exists and appears to work on x86, but if somebody tries to use it, it *doesn't* work. I don't like to write code like that. I think it's poor style. > and it just make x86 not get punished. What punishment are you worried about? I really don't think you'll be able to measure any performance impact. I agree that the x86 code you add *is* simpler than the generic version. But I think the *overall* complexity is higher because now you have to look at two versions (generic and x86) and convince yourself that it's safe to use the x86 version. Bjorn From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]:59247 "EHLO mail-lpp01m010-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932319Ab2CAAm6 (ORCPT ); Wed, 29 Feb 2012 19:42:58 -0500 Received: by lahj13 with SMTP id j13so52599lah.19 for ; Wed, 29 Feb 2012 16:42:56 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1330556858-11768-1-git-send-email-yinghai@kernel.org> <1330556858-11768-3-git-send-email-yinghai@kernel.org> From: Bjorn Helgaas Date: Wed, 29 Feb 2012 17:42:36 -0700 Message-ID: Subject: Re: [PATCH 02/39] x86, PCI: have own version for pcibios_bus_to_resource Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yinghai Lu Cc: Jesse Barnes , Benjamin Herrenschmidt , Tony Luck , David Miller , x86 , Dominik Brodowski , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Message-ID: <20120301004236.S0zWRJOMkeOiLtR8nu0ko_1Ug1QSZ2c6HApszY9_fYA@z> On Wed, Feb 29, 2012 at 4:33 PM, Yinghai Lu wrote: > On Wed, Feb 29, 2012 at 3:20 PM, Bjorn Helgaas wrote: >> On Wed, Feb 29, 2012 at 4:07 PM, Yinghai Lu wrote: >>> x86 does not need to offset the address. So we can skip that costing offset >>> searching. >> >> I tried to start a discussion about this patch (and others), but I >> don't think you responded: >> http://marc.info/?l=linux-pci&m=133036414506921&w=2 > > this patch does reduce some not needed ops. > > and it does not affects your effects, It does affect my efforts in that this patch adds back x86 complexity that I don't think is necessary. And this patch makes it so the pci_add_resource_offset() interface exists and appears to work on x86, but if somebody tries to use it, it *doesn't* work. I don't like to write code like that. I think it's poor style. > and it just make x86 not get punished. What punishment are you worried about? I really don't think you'll be able to measure any performance impact. I agree that the x86 code you add *is* simpler than the generic version. But I think the *overall* complexity is higher because now you have to look at two versions (generic and x86) and convince yourself that it's safe to use the x86 version. Bjorn