Re: [RFC 00/15] x86_64: Optimize percpu accesses

From: Rusty Russell
Date: Fri Jul 11 2008 - 02:59:50 EST


On Friday 11 July 2008 06:22:52 Eric W. Biederman wrote:
> Jeremy Fitzhardinge <jeremy@xxxxxxxx> writes:
> > No, that sounds like a bad idea. For one, how would you enforce it? How
> > would you check for it? It's one of those things that would mostly work
> > and then fail very rarely.
>
> Well the easiest way would be to avoid the letting people take the address
> of per cpu memory, and just provide macros to read/write it. We are 90% of
> the way there already so it isn't a big jump.

Hi Eric,

I decided against that originally, but we can revisit that decision. But
it would *not* be easy. Try it on kernel/sched.c which uses per-cpu "struct
rq".

Perhaps we could limit dynamically allocated per-cpu mem this way though...

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