On Thu, 2018-01-11 at 17:36 +0000, Andrew Cooper wrote: > It is generally worth doing a read to conditionally avoid a locked > RMW, > in the case that you expect the locked RMW to be unnecessary (i.e. > the > modification is already present). > > The same is not true for plain memory reads and writes. The overhead > of > the conditional jump far outweighs the saving of possibly not > dirtying > the cache line. > Sure.
> The reason I noticed this is because (with my bitops change), the > compiler optimised the if out entirely. > Ah, interesting. :-) It's not necessary, as George Acked it already, but feel free to add a: Reviewed-by: Dario Faggioli <dfaggi...@suse.com> Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Software Engineer @ SUSE https://www.suse.com/
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel