From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Date: Tue, 20 Oct 2009 07:39:01 +0000 Subject: Re: Commit 34d76c41 causes linker errors on ia64 with NR_CPUS=4096 Message-Id: <4ADD6915.7000909@kernel.org> List-Id: References: <4ADB967A.4080707@suse.com> <20091020061557.GE8550@elte.hu> <20091020063555.GJ8550@elte.hu> <4ADD62AA.8060503@gmail.com> In-Reply-To: <4ADD62AA.8060503@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Eric Dumazet Cc: Ingo Molnar , Jiri Kosina , Jeff Mahoney , Peter Zijlstra , Linux Kernel Mailing List , Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org Eric Dumazet wrote: > Ingo Molnar a =E9crit : > =20 >> Still looks like a bug if it causes a breakage (linker error) on IA64,=20 >> and if the 'fix' (i'd call it a workaround) causes a (small but nonzero)= =20 >> performance regression on other architectures. >> >=20 > True, but this also save some amount of ram for some distro kernels. >=20 > If we keep this static NR_CPUS thing, we might be able to free > the end of table, for other per_cpu users ? >=20 > if (nr_cpus_ids < NR_CPUS) { > per_cpu_free_static_zone(&update_shares_data[nr_cpus_ids], > sizeof(long)*(NR_CPUS - nr_cpus_ids)); > } That's doable but Considering that the users of NR_CPUS are pretty few (and should be kept that way), I think it would be better to just use dynamic allocation, which no longer incurs any major performance difference (the only difference is constant offset vs. pointer in a variable), for those cases. Thanks. --=20 tejun