Re: [PATCH 2.6.16-mm2 4/4] sched_domain: Allocate sched_group structures dynamically

From: Srivatsa Vaddagiri
Date: Sun Apr 02 2006 - 05:15:57 EST


On Sun, Apr 02, 2006 at 03:21:21PM +1000, Nick Piggin wrote:
> Then after you have allocated sched_group_phys, subsequent cpus
> in cpu_map will have their sched_group_phys_bycpu[] entry
> uninitialised, by the looks?

Not all the CPUs in cpu_map need to have an entry in
sched_group_phys_bycpu[]. sched_group_phys_bycpu[] is purely used to
"remember" the chunk of memory we allocated for sched_group array
for later freeing. Individual CPU's in cpu_map point to a suitable entry
in the sched_group array (thr' their phys_domains structure), as in the
following lines of code after memory allocation:

sd = &per_cpu(phys_domains, i);

...

sd->groups = &sched_group_phys[group];


Hope this clarifies!

--
Regards,
vatsa
-
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/