[PATCH] fs: Replace kmap{,_atomic}() with kmap_local_page()

Fabio M. De Francesco fmdefrancesco at gmail.com
Sat Jul 9 11:30:28 PDT 2022


On venerdì 8 luglio 2022 22:18:35 CEST Ira Weiny wrote:
> On Thu, Jun 30, 2022 at 06:35:27PM +0200, Fabio M. De Francesco wrote:
> > The use of kmap() and kmap_atomic() are being deprecated in favor of
> > kmap_local_page().
> > 
> > With kmap_local_page(), the mappings are per thread, CPU local and not
> > globally visible. Furthermore, the mappings can be acquired from any
> > context (including interrupts).
> > 
> > Therefore, use kmap_local_page() in exec.c because these mappings are 
per
> > thread, CPU local, and not globally visible.
> > 
> > Tested with xfstests on a QEMU + KVM 32-bits VM booting a kernel with
> > HIGHMEM64GB enabled.
> > 
> > Suggested-by: Ira Weiny <ira.weiny at intel.com>
> 
> This looks good but there is a kmap_atomic() in this file which I _think_ 
can
> be converted as well.  But that is good as a separate patch.
> 
> Reviewed-by: Ira Weiny <ira.weiny at intel.com>
> 

Thanks for your review!

I didn't notice that kmap_atomic(). I'll send a conversion with a separate 
patch.

Fabio






More information about the linux-riscv mailing list