Re: [PATCH 1/2] x86/cpu hotplug: make apicid <--> cpuid mapping persistent

From: Tejun Heo
Date: Thu Mar 26 2015 - 11:13:20 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/