[parisc-linux] [PATCH] Remove spinlock_t from cpu_data (and thus from processor.h)

Grant Grundler grundler at parisc-linux.org
Sun Nov 26 00:33:06 MST 2006


On Sat, Nov 25, 2006 at 11:53:44AM -0500, Kyle McMartin wrote:
> This should enable us to clean up our header files nicely.
...

Yes, but...

> +spinlock_t fencepost[NR_CPUS] = {
> +	[0 ... NR_CPUS-1] = SPIN_LOCK_UNLOCKED
> +};

Unless each CPU gets it's own cacheline, I believe this is
going to ping-pong across CPU caches like hell. Thus
the "per-CPU" initialization. If the fencepost[] locks
are seldom used, then it doesn't matter and we could just use
one cacheline.

but I think you are on the right track to unraveling our
header dependencies a bit more...

thanks,
grant



More information about the parisc-linux mailing list