Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1701834
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() |
| Date | 2017-08-02 10:20 +0200 |
| Message-ID | <u9X2N-7mD-9@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <u9IwO-6mc-3@gated-at.bofh.it> <u9IwO-6mc-1@gated-at.bofh.it> <u9OiT-1CI-33@gated-at.bofh.it> <u9RgK-3EF-11@gated-at.bofh.it> <u9X2N-7mD-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Aug 02, 2017 at 10:11:06AM +0200, Peter Zijlstra wrote: > On Wed, Aug 02, 2017 at 11:23:12AM +1000, Benjamin Herrenschmidt wrote: > > On Wed, 2017-08-02 at 00:59 +0200, Peter Zijlstra wrote: > > > > PowerPC for example uses PTESYNC before the TBLIE, so does a SYNC after > > > > work? Ben? > > > > From what I gather it is not. You have TLBSYNC for it. So the good news > > > > tlbsync is pretty much a nop these days. ptesync is a strict superset > > of sync and we have it after every tlbie. > > In the radix code, yes. I got lost going through the hash code, and I > didn't look at the 32bit code at all. > > So the radix code does: > > PTESYNC > TLBIE > EIEIO; TLBSYNC; PTESYNC > > which should be completely ordered against anything prior and anything > following, and is I think the behaviour we want from TLB flushes in > general, but is very much not provided by a number of architectures > afaict. > > Ah, found the hash-64 code, yes that's good too. The hash32 code lives > in asm and confuses me, it has a bunch of SYNC, SYNC_601 and isync in. > The nohash variant seems to do a isync after tlbwe, but again no clue. > > > Now, do I go and attempt fixing all that needs fixing? > > > x86 is good, our CR3 writes or INVLPG stuff is fully serializing. > > arm is good, it does DSB ISH before and after > > arm64 looks good too, although it plays silly games with the first > barrier, but I trust that to be sufficient. The first barrier only orders prior stores for us, because page table updates are made using stores. A prior load could be reordered past the invalidation, but can't make it past the second barrier. I really think we should avoid defining TLB invalidation in terms of smp_mb() because it's a lot more subtle than that. Will
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Will Deacon <will.deacon@arm.com> - 2017-08-01 12:40 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra <peterz@infradead.org> - 2017-08-01 14:20 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra <peterz@infradead.org> - 2017-08-01 18:40 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra <peterz@infradead.org> - 2017-08-01 18:50 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra <peterz@infradead.org> - 2017-08-02 01:00 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2017-08-02 04:10 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Will Deacon <will.deacon@arm.com> - 2017-08-02 10:20 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Will Deacon <will.deacon@arm.com> - 2017-08-02 10:50 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra <peterz@infradead.org> - 2017-08-02 11:00 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Will Deacon <will.deacon@arm.com> - 2017-08-02 11:10 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2017-08-03 04:40 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra <peterz@infradead.org> - 2017-08-02 10:50 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Will Deacon <will.deacon@arm.com> - 2017-08-02 11:10 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra <peterz@infradead.org> - 2017-08-02 11:20 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra <peterz@infradead.org> - 2017-08-02 10:20 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2017-08-02 17:50 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra <peterz@infradead.org> - 2017-08-02 17:50 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2017-08-02 03:10 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Will Deacon <will.deacon@arm.com> - 2017-08-01 18:50 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2017-08-02 04:00 +0200
Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2017-08-01 15:40 +0200
csiph-web