Re: [Lse-tech] [PATCH] new bitmap list format (for cpusets)

From: Paul Jackson
Date: Wed Aug 11 2004 - 11:21:38 EST


Dinakar wrote:
> Considering that cpu_possible_map does not get fully initialized
> until smp_prepare_cpus gets called by init(), I thought it right
> to move cpuset_init() to after smp initialization.

Thank-you. I suspect you're right.

Could you also provide some motivation for the other changes in your
patch, moving struct cpuset, enum cpuset_flagbits_t, and struct cpuset
top_cpuset definitions from kernel/cpuset.c to include/linux/cpuset.h?
I had found it rather pleasing that these structures did not need to
be known outside of kernel/cpuset.c.

Another approach that might work, in order to ensure that the top_cpuset
has its cpus_allowed set to the proper value of cpu_possible_map, would
be to add a routine, say cpuset_init_smp(), called from init/main.c
init() just after smp_init() returns, to update the cpus_allowed in
top_cpuset from the fully initialized value of cpu_possible_map. This
seems to resemble the call sched_init_smp(), also made in init/main.c
init() just after smp_init() returns, to finish initializing some sched
stuff.

If you take your approach, should we remove the __init qualifier from
kernel/cpuset.c cpuset_init()?

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
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/