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


Groups > linux.kernel > #1737185

Re: Rough notes from sys_membarrier() lightning BoF

From Michael Ellerman <mpe@ellerman.id.au>
Newsgroups linux.kernel
Subject Re: Rough notes from sys_membarrier() lightning BoF
Date 2017-09-22 07:10 +0200
Message-ID <usonT-265-1@gated-at.bofh.it> (permalink)
References <uqQoh-5MT-3@gated-at.bofh.it> <urPJw-5ky-7@gated-at.bofh.it> <urRLk-6BR-7@gated-at.bofh.it> <us9yy-1tk-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Peter Zijlstra <peterz@infradead.org> writes:

> On Wed, Sep 20, 2017 at 06:13:50PM +0000, Mathieu Desnoyers wrote:
>
>> > Also, can you elaborate on the PPC issue?  PPC appears to track
>> > mm_cpumask more or less just like x86.  Is the issue just that this
>> > tracking has no implied barriers?  If so, how does TLB flush on ppc
>> > work?  It really does seem impressive to me that an architecture can
>> > efficiently support munmap() but not an expedited private membarrier.
>> 
>> I'll leave this question to the PPC experts :)
>
> IIRC PPC does not keep a tight mm_cpumask, it only sets bit, it never
> clears bits. The atomic op required to set bits does not imply any
> memory barrier on PPC.

Yep.

We do have a full barrier now when we set a bit, but not if the bit was
already set.

> TLB invalidation is a TLBI instruction, it sends TLBI broadcast packets
> over the interconnect, it doesn't require IPIs like x86.

Yep.

> The only optimization PPC does is that if the mm_cpumask has only a
> single bit set, it uses a TLBI instruction without broadcast, which is
> cheaper.

Yep.

We would like to trim the mm_cpumask, but it's one of those hairy
optimisations we have never quite found time to do.

I've been away for two weeks so I've not been able to keep up with the
membarrier discussions. Will try and page it back in next week.

cheers

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


Thread

Rough notes from sys_membarrier() lightning BoF "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-18 00:40 +0200
  Re: Rough notes from sys_membarrier() lightning BoF Alan Stern <stern@rowland.harvard.edu> - 2017-09-18 21:10 +0200
    Re: Rough notes from sys_membarrier() lightning BoF Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-09-18 21:10 +0200
    Re: Rough notes from sys_membarrier() lightning BoF "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-18 21:30 +0200
      Re: Rough notes from sys_membarrier() lightning BoF Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-09-18 21:40 +0200
        Re: Rough notes from sys_membarrier() lightning BoF "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-18 22:40 +0200
  Re: Rough notes from sys_membarrier() lightning BoF Andy Lutomirski <luto@kernel.org> - 2017-09-20 18:10 +0200
    Re: Rough notes from sys_membarrier() lightning BoF Andy Lutomirski <luto@kernel.org> - 2017-09-20 20:20 +0200
      Re: Rough notes from sys_membarrier() lightning BoF Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-09-20 22:00 +0200
    Re: Rough notes from sys_membarrier() lightning BoF Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-09-20 20:20 +0200
      Re: Rough notes from sys_membarrier() lightning BoF Peter Zijlstra <peterz@infradead.org> - 2017-09-21 15:20 +0200
        Re: Rough notes from sys_membarrier() lightning BoF Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-09-21 20:10 +0200
      Re: Rough notes from sys_membarrier() lightning BoF Peter Zijlstra <peterz@infradead.org> - 2017-09-21 15:20 +0200
        Re: Rough notes from sys_membarrier() lightning BoF James Bottomley <James.Bottomley@HansenPartnership.com> - 2017-09-21 19:30 +0200
          Re: Rough notes from sys_membarrier() lightning BoF Peter Zijlstra <peterz@infradead.org> - 2017-09-22 11:40 +0200
        Re: Rough notes from sys_membarrier() lightning BoF Michael Ellerman <mpe@ellerman.id.au> - 2017-09-22 07:10 +0200

csiph-web