Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754568AbZIARKN (ORCPT ); Tue, 1 Sep 2009 13:10:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751178AbZIARKN (ORCPT ); Tue, 1 Sep 2009 13:10:13 -0400 Received: from outbound-mail-16.bluehost.com ([69.89.20.231]:57065 "HELO outbound-mail-16.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750885AbZIARKM (ORCPT ); Tue, 1 Sep 2009 13:10:12 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=virtuousgeek.org; h=Received:Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=PaQB0gu3001TmbEJbnYfD05XYxQ4Ui/O9rOTm8D7sezTiOrGmNfnBvqSERjzBCTqfNL3ucZrYoXcJC2y/R5TVY7+hkW9P/9oMzv+y94F+L4tcycfE4nZTU4xC6OGbVBV; Date: Tue, 1 Sep 2009 10:09:51 -0700 From: Jesse Barnes To: Yinghai Lu Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , linux-kernel@vger.kernel.org, Jesse Brandeburg Subject: Re: [PATCH] x86/PCI: initialize PCI bus node numbers early Message-ID: <20090901100951.6bf5f7e0@jbarnes-g45> In-Reply-To: <4A9D5206.5010603@kernel.org> References: <20090710104419.0032be7b@jbarnes-g45> <20090901135358.GA31282@elte.hu> <4A9D5206.5010603@kernel.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.17.5; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 75.111.28.251 authed with jbarnes@virtuousgeek.org} Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2325 Lines: 57 On Tue, 01 Sep 2009 09:55:34 -0700 Yinghai Lu wrote: > Ingo Molnar wrote: > > * Jesse Barnes wrote: > > > >> The current mp_bus_to_node array is initialized only by AMD > >> specific code, since AMD platforms have registers that can be used > >> for determining mode numbers. On new Intel platforms it's > >> necessary to initialize this array as well though, otherwise all > >> PCI node numbers will be 0, when in fact they should be -1 > >> (indicating that I/O isn't tied to any particular node). > >> > >> So move the mp_bus_to_node code into the common PCI code, and > >> initialize it early with a default value of -1. This may be > >> overridden later by arch code (e.g. the AMD code). > >> > >> With this change, PCI consistent memory and other node specific > >> allocations (e.g. skbuff allocs) should occur on the "current" > >> node. If, for performance reasons, applications want to be bound > >> to specific nodes, they should open their devices only after being > >> pinned to the CPU where they'll run, for maximum locality. > >> > >> Any thoughts here Yinghai or Jesse? > >> > >> > >> include/asm/pci.h | 2 + > >> kernel/setup.c | 2 + > >> pci/amd_bus.c | 61 > >> +----------------------------------------- pci/common.c | > >> 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files > >> changed, 83 insertions(+), 59 deletions(-) > > > > FYI, this commit: > > > > acccaba: x86/PCI: initialize PCI bus node numbers early > > > > caused a boot crash in -tip testing: > > > > looks like the patch change default 0 in 32bit to -1 ... Yeah, that's the idea. We want the node to be "don't care" on platforms that don't have a specific bridge to node mapping. Not sure why it fails in the mrst tree though.. Looks like we're taking an amd specific path in the backtrace, maybe with the reshuffling of things we're calling one of the amd routines before the real node numbers have been set up and they can't handle -1? -- Jesse Barnes, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/