Re: [patch] Re: Bug 619 - sched_best_cpu does not pick best cpu (1/1)

Andrew Theurer (habanero@us.ibm.com)
Wed, 14 May 2003 20:48:53 -0500


On Wednesday 14 May 2003 20:26, Zwane Mwaikambo wrote:
> 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?

I'd rather cache it. I believe hweight() will be the asm-generic routine.

-Andrew

-
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/