On Friday, December 16, 2005 2:53 pm, David S. Miller wrote: > When the write comes along, the next transaction occurs to kick it > out the other cpu(s) caches and then the local line is placed into > Owned state. > > I'll have to add "put write prefetch in CAS sequences" onto my sparc64 > TODO list :-)
Note that under contention prefetching with a write bias can cause a lot more cache line bouncing than a regular load into shared state (assuming you do a load and test before you try the CAS). We actually saw this on large Altix machines, http://lia64.bkbits.net:8080/to-linus-2.5/cset%403f2082b3xCvMG9OSeNu3aWhoe6jnOg?nav=index.html| src/.|src/include|src/include/asm-ia64| related/include/asm-ia64/spinlock.h fixed things up for us. Jesse
