From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752301AbbJMJcJ (ORCPT ); Tue, 13 Oct 2015 05:32:09 -0400 Received: from mga14.intel.com ([192.55.52.115]:35655 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752020AbbJMJcI (ORCPT ); Tue, 13 Oct 2015 05:32:08 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,677,1437462000"; d="scan'208";a="825466434" Subject: Re: [PATCH 3/3] x86/apic: Use smaller array for __apicid_to_node[] mapping To: Thomas Gleixner , Daniel J Blueman References: <1443813145-29102-1-git-send-email-dvlasenk@redhat.com> <1443813145-29102-3-git-send-email-dvlasenk@redhat.com> <5617DEC4.5060705@linux.intel.com> <1444645261.25258.1@outlook-emeawest.office365.com> Cc: Denys Vlasenko , Ingo Molnar , Len Brown , x86@kernel.org, linux-kernel@vger.kernel.org From: Jiang Liu Organization: Intel Message-ID: <561CCF92.1030909@linux.intel.com> Date: Tue, 13 Oct 2015 17:32:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/10/12 18:25, Thomas Gleixner wrote: > On Mon, 12 Oct 2015, Daniel J Blueman wrote: >> Another approach which may be suitable without changing SRAT parsing to be >> after the memory allocator is up, is to exploit the associativity of the >> bottom APIC ID bits. > > What's the problem with moving (SRAT/ACPI/whatever) APIC parsing after > the memory allocator is up and available? Hi Thomas, The work flow is as below at boot: 1) figure out memory NUMA topology info by walking ACPI table or probing AMD northbirdge. 2) initialize memory allocation based on memory NUMA topology. And to make code simple, it also scan CPU NUMA topology in step 1, so we could avoid walking ACPI tables twice. On the other hand, there are several subsystems having code pattern as follow before booting APs. up: for_each_possible_cpu(cpu) alloc_page_node(size, cpu_to_node(cpu)) So it's a little hard to find a suitable hook point to delay CPU NUMA topology scanning after memory allocator is ready. Thanks, Gerry > > Thanks, > > tglx > -- > 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/ >