Re: [PATCH] per-cpu areas

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Wed Feb 13 2002 - 04:48:53 EST


In message <20020212102852.I32236@in.ibm.com> you write:
> > +static void __init setup_per_cpu_areas(void)
> > +{
> > + unsigned long size, i;
> > + char *ptr;
> > + /* Created by linker magic */
> > + extern char __per_cpu_start[], __per_cpu_end[];
> > +
> > + /* Copy section for each CPU (we discard the original) */
> > + size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
> > + ptr = alloc_bootmem(size * NR_CPUS);
>
> Would it be possible to free up NR_CPUS - smp_num_cpus worth of memory
> after smp_init? ....

Yes, but memory is cheap, and writing a special "partial free"
function for this is icky. Maybe in 2 years when the per-cpu area is
100MB. 8)

We're better off reducing NR_CPUs to the maxmimum possible value of
smp_num_cpus() on that machine, IMHO.

Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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/



This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:53 EST