linux/fs/hostfs
Fabio M. De Francesco e0820368d0 hostfs: Replace kmap() with kmap_local_page()
The use of kmap() is being deprecated in favor of kmap_local_page().

There are two main problems with kmap(): (1) It comes with an overhead as
the mapping space is restricted and protected by a global lock for
synchronization and (2) it also requires global TLB invalidation when the
kmap’s pool wraps and it might block when the mapping space is fully
utilized until a slot becomes available.

With kmap_local_page() the mappings are per thread, CPU local, can take
page faults, and can be called from any context (including interrupts).
It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore,
the tasks can be preempted and, when they are scheduled to run again, the
kernel virtual addresses are restored and still valid.

Therefore, replace kmap() with kmap_local_page() in hostfs_kern.c, it
being the only file with kmap() call sites currently left in fs/hostfs.

Cc: "Venkataramanan, Anirudh" <anirudh.venkataramanan@intel.com>
Suggested-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2023-02-01 22:11:26 +01:00
..
hostfs_kern.c hostfs: Replace kmap() with kmap_local_page() 2023-02-01 22:11:26 +01:00
hostfs_user.c hostfs: rename do_rmdir() to hostfs_do_rmdir() 2018-04-02 20:15:53 +02:00
hostfs.h hostfs: pass 64-bit timestamps to/from user space 2019-12-18 18:07:32 +01:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00