Avi Kivity wrote:
Christian Ehrhardt wrote:
Really need that smp_mb__after_clear_bit ? AFAIK test_and_clear_bit
implies a barrier?
Well I agree that practically test_and_clear_bit has a barrier on
s390, but as far as I read Documentation/atomic_ops.txt at line
339-360 I think the interface does not imply it so I wanted to add it
explicitly. I would be happy if someone really knows the in depth
details here and corrects me :-)
IIUC rmw bitops are full memory barriers. The non-rmw (from the
caller's perspective), clear_bit() and set_bit(), are not.
Ok, as the real implementation has one + memory-barriers.txt describing
it with barrier and finally include/asm-generic/bitops/atomic.h
descirbes it that way too I think I can drop the explicit smb_wb from my
patch in the next update (I wait a bit to give the discussion about the
wati/bits a bit more time).
Hmm ... would that be worth a clarifying patch to atomic_ops.txt that
confused me in the first place ?
--
Grüsse / regards, Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html