From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752856AbbCZPNR (ORCPT ); Thu, 26 Mar 2015 11:13:17 -0400 Received: from mail-qg0-f48.google.com ([209.85.192.48]:35813 "EHLO mail-qg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752161AbbCZPNP (ORCPT ); Thu, 26 Mar 2015 11:13:15 -0400 Date: Thu, 26 Mar 2015 11:13:12 -0400 From: Tejun Heo To: Gu Zheng Cc: Kamezawa Hiroyuki , linux-kernel@vger.kernel.org, laijs@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, tangchen@cn.fujitsu.com, izumi.taku@jp.fujitsu.com Subject: Re: [PATCH 1/2] x86/cpu hotplug: make apicid <--> cpuid mapping persistent Message-ID: <20150326151312.GC1953@htj.duckdns.org> References: <1427336275-32066-1-git-send-email-guz.fnst@cn.fujitsu.com> <1427336275-32066-2-git-send-email-guz.fnst@cn.fujitsu.com> <55137ADF.7070703@jp.fujitsu.com> <55139128.2050603@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55139128.2050603@cn.fujitsu.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2015 at 12:55:04PM +0800, Gu Zheng wrote: > >> +static int apicid_to_x86_cpu[MAX_LOCAL_APIC] = { > >> + [0 ... MAX_LOCAL_APIC - 1] = -1, > >> +}; > > > > > > This patch cannot handle x2apic, which is 32bit. > > IMO, if the apicid is too big (larger than MAX_LOCAL_APIC), we will skip > generating a logic cpu number for it, so it seems no problem here. You're defining 128k array on 64bit most of which will be unused on most machines. There is a problem with that. Thanks. -- tejun