On Mon, Nov 11, 2013 at 06:10:49PM +0000, Will Deacon wrote: > > + /* > > + * Wait until the lock holder passes the lock down. > > + * Using smp_load_acquire() provides a memory barrier that > > + * ensures subsequent operations happen after the lock is acquired. > > + */ > > + while (!(smp_load_acquire(&node->locked))) > > arch_mutex_cpu_relax(); > Thinking more about that, the real issue here is that arch_mutex_cpu_relax() > doesn't have a corresponding hook on the unlock side. On ARM, for example, > we can enter a low-power state using the wfe instruction, but that requires > the unlocker to wake up the core when the lock is released. That said, it would be ever so awesome if we could come to some sort of conclusion on control dependencies here. I _know_ C/C++ doesn't do them, but at the end of the day the compiler still generates ASM and as long as we're relatively certain there's a loop there (there has to be, right? :-), we could maybe rely on it anyway. -- 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>