Thread (61 messages) 61 messages, 10 authors, 2017-09-11

Re: [PATCH v2 14/20] mm: Provide speculative fault infrastructure

From: Peter Zijlstra <peterz@infradead.org>
Date: 2017-08-29 11:28:22
Also in: linux-mm, lkml

On Tue, Aug 29, 2017 at 10:33:52AM +0200, Peter Zijlstra wrote:
On Tue, Aug 29, 2017 at 07:14:37AM +1000, Benjamin Herrenschmidt wrote:
quoted
We'd have to audit archs closely. Things like the page walk cache
flushing on power etc...
If you point me where to look, I'll have a poke around. I'm not
quite sure what you mean with pagewalk cache flushing. Your hash thing
flushes everything inside the PTL IIRC and the radix code appears fairly
'normal'.
mpe helped me out and explained that is the PWC hint to TBLIE.

So, you set need_flush_all when you unhook pud/pmd/pte which you then
use to set PWC. So free_pgtables() will do the PWC when it unhooks
higher level pages.

But you're right that there's some issues, free_pgtables() itself
doesn't seem to use mm->page_table_lock,pmd->lock _AT_ALL_ to unhook the
pages.

If it were to do that, things should work fine since those locks would
then serialize against the speculative faults, we would never install a
page if the VMA would be under tear-down and it would thus not be
visible to your caches either.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help