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


Groups > linux.kernel > #1258392

Re: [PATCH 3/4] x86,asm: Re-work smp_store_mb()

From Davidlohr Bueso <dave@stgolabs.net>
Newsgroups linux.kernel
Subject Re: [PATCH 3/4] x86,asm: Re-work smp_store_mb()
Date 2015-10-28 21:00 +0100
Message-ID <qoF33-71h-1@gated-at.bofh.it> (permalink)
References <qoizw-SL-5@gated-at.bofh.it> <qoizw-SL-9@gated-at.bofh.it> <qok8l-1XT-91@gated-at.bofh.it> <qomD9-3DG-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 27 Oct 2015, Peter Zijlstra wrote:

>On Wed, Oct 28, 2015 at 06:33:56AM +0900, Linus Torvalds wrote:
>> On Wed, Oct 28, 2015 at 4:53 AM, Davidlohr Bueso <dave@stgolabs.net> wrote:
>> >
>> > Note that this might affect callers that could/would rely on the
>> > atomicity semantics, but there are no guarantees of that for
>> > smp_store_mb() mentioned anywhere, plus most archs use this anyway.
>> > Thus we continue to be consistent with the memory-barriers.txt file,
>> > and more importantly, maintain the semantics of the smp_ nature.
>>
>
>> So with this patch, the whole thing becomes pointless, I feel. (Ok, so
>> it may have been pointless before too, but at least before this patch
>> it generated special code, now it doesn't). So why carry it along at
>> all?
>
>So I suppose this boils down to if: XCHG ends up being cheaper than
>MOV+FENCE.

If so, could this be the reasoning behind the mix and match of xchg and
MOV+FENCE? for different archs? This is from the days when set_mb() was
introduced. I wonder if it still even matters... I at least haven't seen
much difference in general workloads (I guess any difference would be
neglictible for practical matters). But could obviously be missing something.

>PeterA, any idea?

I suppose you're referring to hpa, Cc'ing him.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH 3/4] x86,asm: Re-work smp_store_mb() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-27 21:00 +0100
  Re: [PATCH 3/4] x86,asm: Re-work smp_store_mb() Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-27 22:40 +0100
    Re: [PATCH 3/4] x86,asm: Re-work smp_store_mb() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-27 23:10 +0100
    Re: [PATCH 3/4] x86,asm: Re-work smp_store_mb() Peter Zijlstra <peterz@infradead.org> - 2015-10-28 01:20 +0100
      Re: [PATCH 3/4] x86,asm: Re-work smp_store_mb() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-28 21:00 +0100

csiph-web