Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263335AbUCSAWK (ORCPT ); Thu, 18 Mar 2004 19:22:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263308AbUCSASL (ORCPT ); Thu, 18 Mar 2004 19:18:11 -0500 Received: from mtvcafw.sgi.com ([192.48.171.6]:12209 "EHLO omx2.sgi.com") by vger.kernel.org with ESMTP id S263169AbUCSAQF (ORCPT ); Thu, 18 Mar 2004 19:16:05 -0500 From: Jesse Barnes To: colpatch@us.ibm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nodemask_t ia64 changes [6/7] Date: Thu, 18 Mar 2004 16:15:18 -0800 User-Agent: KMail/1.6.1 References: <1079651085.8149.177.camel@arrakis> In-Reply-To: <1079651085.8149.177.camel@arrakis> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403181615.18498.jbarnes@sgi.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4151 Lines: 105 On Thursday 18 March 2004 3:04 pm, Matthew Dobson wrote: > nodemask_t-06-ia64.patch - Changes to ia64 specific code. Untested. > Code review & testing requested. diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.4-vanilla/arch/ia64/kernel/smpboot.c linux-2.6.4-nodemask_t-ia64/arch/ia64/kernel/smpboot.c --- linux-2.6.4-vanilla/arch/ia64/kernel/smpboot.c Wed Mar 10 18:55:24 2004 +++ linux-2.6.4-nodemask_t-ia64/arch/ia64/kernel/smpboot.c Thu Mar 11 16:02:22 2004 @@ -474,7 +474,7 @@ build_cpu_to_node_map (void) { int cpu, i, node; - for(node=0; nodebrd_nasid == nasid)) return start; - if (numionodes == numnodes) + if (numionodes == num_online_nodes()) start = KLCF_NEXT_ANY(start); else start = KLCF_NEXT(start); @@ -95,7 +95,7 @@ find_lboard_class_nasid(lboard_t *start, (start->brd_nasid == nasid)) return start; - if (numionodes == numnodes) + if (numionodes == num_online_nodes()) start = KLCF_NEXT_ANY(start); @@ -210,7 +210,7 @@ io_module_init(void) /* * Second scan, look for headless/memless board hosted by compute nodes. */ - for (node = numnodes; node < numionodes; node++) { + for (node = num_online_nodes(); node < numionodes; node++) { nasid_t nasid; Here's the ionode stuff I was talking about... diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.4-vanilla/include/asm-ia64/numa.h linux-2.6.4-nodemask_t-ia64/include/asm-ia64/numa.h --- linux-2.6.4-vanilla/include/asm-ia64/numa.h Wed Mar 10 18:55:25 2004 +++ linux-2.6.4-nodemask_t-ia64/include/asm-ia64/numa.h Thu Mar 11 12:01:24 2004 @@ -59,7 +59,7 @@ extern struct node_cpuid_s node_cpuid[NR */ extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES]; -#define node_distance(from,to) (numa_slit[from * numnodes + to]) +#define node_distance(from,to) (numa_slit[from * num_online_nodes() + to]) Might the SLIT contain offline nodes too? I can imagine that it might for hotplug aware hardware... /* klnuma.c */ -extern void replicate_kernel_text(int numnodes); +extern void replicate_kernel_text(void); /* TODO: is this used??? */ extern unsigned long get_freemem_start(cnodeid_t cnode); -extern void setup_replication_mask(int maxnodes); +extern void setup_replication_mask(void); /* TODO: is this used??? */ Nope, it was at one time, but didn't provide much benefit (we should probably benchmark it again on a really large system...). Other than that, it looks ok. Now I've got to test it. Thanks, Jesse - 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/