From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753671AbYAOKyY (ORCPT ); Tue, 15 Jan 2008 05:54:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751220AbYAOKyP (ORCPT ); Tue, 15 Jan 2008 05:54:15 -0500 Received: from mx1.suse.de ([195.135.220.2]:37850 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751078AbYAOKyO (ORCPT ); Tue, 15 Jan 2008 05:54:14 -0500 To: travis@sgi.com Cc: Andrew Morton , mingo@elte.hu, Christoph Lameter , Jack Steiner , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 08/10] x86: Change NR_CPUS arrays in numa_64 V2 From: Andi Kleen References: <20080115021735.779102000@sgi.com> <20080115021737.228970000@sgi.com> Date: Tue, 15 Jan 2008 11:54:12 +0100 In-Reply-To: <20080115021737.228970000@sgi.com> (travis@sgi.com's message of "Mon\, 14 Jan 2008 18\:17\:43 -0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org travis@sgi.com writes: > + > /* Returns the number of the node containing CPU 'cpu' */ > static inline int cpu_to_node(int cpu) > { > - return cpu_to_node_map[cpu]; > + u16 *cpu_to_node_map = x86_cpu_to_node_map_early_ptr; > + > + if (cpu_to_node_map) > + return cpu_to_node_map[cpu]; > + else if(per_cpu_offset(cpu)) > + return per_cpu(x86_cpu_to_node_map, cpu); > + else > + return NUMA_NO_NODE; Seems a little big now to be still inlined. Also I wonder if there are really that many early callers that it isn't feasible to just convert them to a early_cpu_to_node(). Also early_cpu_to_node() should really not be speed critical, so just linearly searching some other table instead of setting up an explicit array should be fine for that. -Andi