Re: [patch] Re: Bug 619 - sched_best_cpu does not pick best cpu

Zwane Mwaikambo (zwane@linuxpower.ca)
Wed, 14 May 2003 21:26:18 -0400 (EDT)


On Wed, 14 May 2003, Andrew Theurer wrote:

> +int nr_cpus_in_node[MAX_NUMNODES] = { [0 ... (MAX_NUMNODES -1)] = 0};
[snip...]
> +static inline int nr_cpus_node(int node)
> +{
> + return nr_cpus_in_node[node];
> +}
> +
> static inline int cpu_to_node(int cpu)
> {
> int node;

How about an hweight() on node_to_cpumask?

Zwane

-- 
function.linuxpower.ca
-
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/