From: Michael Ellerman <mpe@ellerman.id.au>
To: Peter Zijlstra <peterz@infradead.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andy Lutomirski <luto@kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Will Deacon <will.deacon@arm.com>,
Alan Stern <stern@rowland.harvard.edu>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-arch <linux-arch@vger.kernel.org>,
Dave Watson <davejwatson@fb.com>,
maged michael <maged.michael@gmail.com>
Subject: Re: Rough notes from sys_membarrier() lightning BoF
Date: Fri, 22 Sep 2017 15:08:00 +1000 [thread overview]
Message-ID: <87377fuxqn.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20170921130950.nwfbyiil34psoyua@hirez.programming.kicks-ass.net>
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
next prev parent reply other threads:[~2017-09-22 5:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 22:36 Paul E. McKenney
2017-09-18 19:04 ` Alan Stern
2017-09-18 19:10 ` Mathieu Desnoyers
2017-09-18 19:29 ` Paul E. McKenney
2017-09-18 19:37 ` Mathieu Desnoyers
2017-09-18 20:34 ` Paul E. McKenney
2017-09-20 16:02 ` Andy Lutomirski
2017-09-20 18:13 ` Mathieu Desnoyers
2017-09-20 18:18 ` Andy Lutomirski
2017-09-20 19:57 ` Mathieu Desnoyers
2017-09-21 13:09 ` Peter Zijlstra
2017-09-21 17:23 ` James Bottomley
2017-09-22 9:33 ` Peter Zijlstra
2017-09-22 5:08 ` Michael Ellerman [this message]
2017-09-21 13:15 ` Peter Zijlstra
2017-09-21 18:03 ` Mathieu Desnoyers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87377fuxqn.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=davejwatson@fb.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=maged.michael@gmail.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=stern@rowland.harvard.edu \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®