[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170727100957.2ypnq6aszlatpa3c@hirez.programming.kicks-ass.net>
Date: Thu, 27 Jul 2017 12:09:57 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Lai Jiangshan <jiangshanlai@...il.com>,
dipankar <dipankar@...ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Josh Triplett <josh@...htriplett.org>,
Thomas Gleixner <tglx@...utronix.de>,
rostedt <rostedt@...dmis.org>,
David Howells <dhowells@...hat.com>,
Eric Dumazet <edumazet@...gle.com>,
fweisbec <fweisbec@...il.com>, Oleg Nesterov <oleg@...hat.com>,
Will Deacon <will.deacon@....com>
Subject: Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option
On Thu, Jul 27, 2017 at 10:53:12AM +0200, Peter Zijlstra wrote:
> Another crazy idea is using madvise() for this. The new MADV_MEMBAR
> could revoke PROT_WRITE and PROT_READ for all extant PTEs. Then the
> tasks attempting access will fault and the fault handler can figure out
> if it still needs to issue a MB or not before reinstating the PTE.
Slight oversight is that page-tables are per process and we need a MB
per thread, so the fault handler can simply issue a private
sys_membarrier() to spread the joy around the local process.
> That is fully contained to the tasks actually having that map, and
> doesn't perturb anybody else.
Powered by blists - more mailing lists