Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1427997

Re: cmpxchg and x86 flags output

From "H. Peter Anvin" <hpa@zytor.com>
Newsgroups linux.kernel
Subject Re: cmpxchg and x86 flags output
Date 2016-06-21 19:40 +0200
Message-ID <rMxOx-pg-3@gated-at.bofh.it> (permalink)
References <rKNXr-5C7-1@gated-at.bofh.it> <rK6ps-3cQ-7@gated-at.bofh.it> <rKeQ2-iF-19@gated-at.bofh.it> <rMpQZ-3Mw-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 06/21/16 02:06, David Howells wrote:
> 
> However, there's probably not a great deal of difference to be had if the
> inline asm codes the appropriate instruction in each case for something like
> x86*.  The emitted code ought to look the same.  The second biggest win for
> the intriniscs, I think, is the ability to ask the CMPXCHG instruction whether
> it actually did anything rather than comparing the result.  I added two
> variants, one that only returned the yes/no and one that passed back the value
> as well as the yes/no.
> 

Right, and we want that either way.  The API change that you are
proposing is definitely what we want; the specifics of the x86
implementation is sort of orthogonal.

	-hpa

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

cmpxchg and x86 flags output "H. Peter Anvin" <hpa@zytor.com> - 2016-06-15 02:00 +0200
  Re: cmpxchg and x86 flags output Peter Zijlstra <peterz@infradead.org> - 2016-06-15 11:00 +0200
    Re: cmpxchg and x86 flags output "H. Peter Anvin" <hpa@zytor.com> - 2016-06-17 00:30 +0200
      Re: cmpxchg and x86 flags output David Howells <dhowells@redhat.com> - 2016-06-21 11:10 +0200
        Re: cmpxchg and x86 flags output "H. Peter Anvin" <hpa@zytor.com> - 2016-06-21 19:10 +0200
          Re: cmpxchg and x86 flags output David Howells <dhowells@redhat.com> - 2016-06-22 18:20 +0200
            Re: cmpxchg and x86 flags output "H. Peter Anvin" <hpa@zytor.com> - 2016-06-22 18:40 +0200
              Re: cmpxchg and x86 flags output Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-22 19:20 +0200
                Re: cmpxchg and x86 flags output "H. Peter Anvin" <hpa@zytor.com> - 2016-06-22 20:00 +0200
        Re: cmpxchg and x86 flags output "H. Peter Anvin" <hpa@zytor.com> - 2016-06-21 19:40 +0200
          Re: cmpxchg and x86 flags output "H. Peter Anvin" <hpa@zytor.com> - 2016-06-22 02:40 +0200
            Re: cmpxchg and x86 flags output David Howells <dhowells@redhat.com> - 2016-06-22 18:20 +0200

csiph-web