Prev: random: reorder struct entropy_store to remove padding on 64bits
Next: [PATCH 02/10] s390: sysinfo: check return value of create_proc_read_entry()
From: H. Peter Anvin on 28 Jul 2010 12:10 On 07/28/2010 08:45 AM, Linus Torvalds wrote: > On Tue, Jul 27, 2010 at 10:33 PM, tip-bot for H. Peter Anvin > <hpa(a)zytor.com> wrote: >> >> x86: Add memory modify constraints to xchg() and cmpxchg() > > Ack. I assume this doesn't really change the code generated? At least > not with a gcc that honors the whole memory clobber thing properly? I didn't do a binary A:B comparison, on the assumption it would preturb the code too much to be equal, but I guess it would be a good idea to at least try. > I also suspect that we can/should get rid of the __xg() thing - it was > there just to make sure gcc didn't see the memory read as a single > word and tried to optimize it. With the "+m" it probably doesn't > matter any more (don't know if it ever did) "+m" would still see as a single word, but the __xg() thing should be obsoleted by asm volatile + "memory", neither of which were in the 1.3.11 version. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: H. Peter Anvin on 28 Jul 2010 19:10
On 07/28/2010 08:45 AM, Linus Torvalds wrote: > On Tue, Jul 27, 2010 at 10:33 PM, tip-bot for H. Peter Anvin > <hpa(a)zytor.com> wrote: >> >> x86: Add memory modify constraints to xchg() and cmpxchg() > > Ack. I assume this doesn't really change the code generated? At least > not with a gcc that honors the whole memory clobber thing properly? > > I also suspect that we can/should get rid of the __xg() thing - it was > there just to make sure gcc didn't see the memory read as a single > word and tried to optimize it. With the "+m" it probably doesn't > matter any more (don't know if it ever did) > For what it's worth, it fairly heavily preturbs code around __set_64bit(), which implies it actually does something useful in that case. The rest of the code looks similar enough. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |