Thread (30 messages) 30 messages, 3 authors, 2020-07-14

Re: [RFC PATCH 12/15] kmap: Add stray write protection for device pages

From: Peter Zijlstra <peterz@infradead.org>
Date: 2020-07-14 19:49:46
Also in: linux-fsdevel, linux-kselftest, linux-mm, lkml, nvdimm

On Tue, Jul 14, 2020 at 12:42:11PM -0700, Dave Hansen wrote:
On 7/14/20 12:29 PM, Peter Zijlstra wrote:
quoted
On Tue, Jul 14, 2020 at 12:06:16PM -0700, Ira Weiny wrote:
quoted
On Tue, Jul 14, 2020 at 10:44:51AM +0200, Peter Zijlstra wrote:
quoted
So, if I followed along correctly, you're proposing to do a WRMSR per
k{,un}map{_atomic}(), sounds like excellent performance all-round :-(
Only to pages which have this additional protection, ie not DRAM.

User mappings of this memory is not affected (would be covered by User PKeys if
desired).  User mappings to persistent memory are the primary use case and the
performant path.
Because performance to non-volatile memory doesn't matter? I think Dave
has a better answer here ...
So, these WRMSRs are less evil than normal.  They're architecturally
non-serializing instructions,
Excellent, that should make these a fair bit faster than regular MSRs.
But, either way, this *will* make accessing PMEM more expensive from the
kernel.  No escaping that. 
There's no free lunch, it's just that regular MSRs are fairly horrible.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help