lkml.org 
[lkml]   [2002]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] per-cpu areas
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.042 / U:0.548 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site