On 12/16/2013 04:01 PM, Andrew Morton wrote: > On Fri, 13 Dec 2013 15:59:03 -0800 Dave Hansen <dave@xxxxxxxx> wrote: >> SLUB depends on a 16-byte cmpxchg for an optimization. For the >> purposes of this series, I'm assuming that it is a very important >> optimization that we desperately need to keep around. > > What if we don't do that. I'll do some testing and see if I can coax out any delta from the optimization myself. Christoph went to a lot of trouble to put this together, so I assumed that he had a really good reason, although the changelogs don't really mention any. I honestly can't imagine that a cmpxchg16 is going to be *THAT* much cheaper than a per-page spinlock. The contended case of the cmpxchg is way more expensive than spinlock contention for sure. fc9bb8c768's commit message says: > The doublewords must be properly aligned for cmpxchg_double to work. > Sadly this increases the size of page struct by one word on some architectures. > But as a resultpage structs are now cacheline aligned on x86_64. I'm not sure what aligning them buys us though. I think I just demonstrated that cache footprint is *way* more important than alignment. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>