Re: [PATCH RFC V2 14/17] dax: Stray write protection for dax_direct_access()

2020-07-18 Thread Ira Weiny
On Fri, Jul 17, 2020 at 11:22:43AM +0200, Peter Zijlstra wrote: > On Fri, Jul 17, 2020 at 12:20:53AM -0700, ira.we...@intel.com wrote: > > > --- a/drivers/dax/super.c > > +++ b/drivers/dax/super.c > > @@ -30,12 +30,14 @@ static DEFINE_SPINLOCK(dax_host_lock); > > > > int dax_read_lock(void) >

Re: [PATCH RFC V2 14/17] dax: Stray write protection for dax_direct_access()

2020-07-17 Thread Peter Zijlstra
On Fri, Jul 17, 2020 at 12:20:53AM -0700, ira.we...@intel.com wrote: > --- a/drivers/dax/super.c > +++ b/drivers/dax/super.c > @@ -30,12 +30,14 @@ static DEFINE_SPINLOCK(dax_host_lock); > > int dax_read_lock(void) > { > + dev_access_enable(); > return srcu_read_lock(_srcu); > } >

[PATCH RFC V2 14/17] dax: Stray write protection for dax_direct_access()

2020-07-17 Thread ira . weiny
From: Ira Weiny dax_direct_access() is a special case of accessing pmem via a page offset and without a struct page. Because the dax driver is well aware of the special protections it has mapped memory with, call dev_access_[en|dis]able() directly instead of the unnecessary overhead of trying