On Thu, 8 Jan 2015, Joonsoo Kim wrote: > > You'd need a smp_wmb() in between tid and c in the loop then, which > > looks quite unpleasant. All in all disabling preemption isn't really > > that expensive, and you should redo your performance number if you go > > this way. > > This barrier() is not for read/write synchronization between cpus. > All read/write operation to cpu_slab would happen on correct cpu in > successful case. What I'd need to guarantee here is to prevent > reordering between fetching operation for correctness of algorithm. In > this case, barrier() seems enough to me. Am I wrong? You are right. -- 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>