Re: [PATCH 2/2] lib: cpu_rmap: CPU affinity reverse-mapping

From: Eric Dumazet
Date: Tue Jan 04 2011 - 17:19:12 EST


Le mardi 04 janvier 2011 Ã 22:04 +0000, Ben Hutchings a Ãcrit :

> get_rps_cpu() will need to read from an arbitrary entry in cpu_rmap (not
> the current CPU's entry) for each new flow and for each flow that went
> idle for a while. That's not fast path but it is part of the data path,
> not the control path.
>

Hmm, I call this fast path :(

> > Cache lines dont matter. I was not concerned about speed but memory
> > needs.
> >
> > NR_CPUS can be 4096 on some distros, that means a 32Kbyte allocation.
> >
> > Really, you'll have to have very strong arguments to introduce an
> > [NR_CPUS] array in the kernel today.
>
> I could replace this with a pointer to an array of size
> num_possible_cpus(). But I think per_cpu is wrong here.

Yes, an dynamic array is acceptable

You probably mean nr_cpu_ids




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