On Wed, 30 Apr 2008, Nick Piggin wrote: > > Actually, aside, all those smp_wmb() things in pgtable-3level.h can > probably go away if we cared: because we could be sneaky and leverage > the assumption that top and bottom will always be in the same cacheline > and thus should be shielded from memory consistency problems :) I've sometimes wondered along those lines. But it would need interrupts disabled, wouldn't it? And could SMM mess it up? And what about another CPU taking the cacheline to modify it in between our two accesses? I don't think we do care in that x86 PAE case, but as a general principal, if it can be safely assumed on all architectures (or more messily, just on some) under certain conditions, then shouldn't we be looking to use that technique (relying on a consistent view of separate variables clustered into the same cacheline) in critical places, rather than regarding it as sneaky? But I suspect this is a chimaera, that there's actually no safe use to be made of it. I'd be glad to be shown wrong. Hugh -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html