linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: Replace kmap() with kmap_local_page()
@ 2022-05-31 14:53 Fabio M. De Francesco
  2022-05-31 14:53 ` [PATCH 1/3] btrfs: Replace kmap() with kmap_local_page() in inode.c Fabio M. De Francesco
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Fabio M. De Francesco @ 2022-05-31 14:53 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba, Ira Weiny, linux-btrfs,
	linux-kernel
  Cc: Fabio M. De Francesco

This is the first series of patches aimed towards the conversion of Btrfs
filesystem from the use of kmap() to kmap_local_page().

The use of kmap() is being deprecated in favor of kmap_local_page() where
it is feasible. With kmap_local_page() the mapping is per thread, CPU
local and not globally visible.

Therefore, use kmap_local_page() / kunmap_local() in Btrfs wherever the
mappings are per thread and not globally visible.

Tested on QEMU + KVM 32 bits VM with 4GB of RAM and HIGHMEM64G enabled.

tweed32:~ # uname -a
Linux tweed32 5.18.0-torvalds-debug-x86_32+ #2 SMP PREEMPT_DYNAMIC Tue \
May 31 15:20:07 CEST 2022 i686 athlon i386 GNU/Linux

tweed32:~ # btrfs check -p ~zoek/dev/btrfs.file
Opening filesystem to check...
Checking filesystem on /home/zoek/dev/btrfs.file
UUID: 897d65c5-1167-45b4-b811-2bfe74a320ca
[1/7] checking root items                      (0:00:00 elapsed, 1774 items checked)
[2/7] checking extents                         (0:00:00 elapsed, 135 items checked)
[3/7] checking free space tree                 (0:00:00 elapsed, 4 items checked)
[4/7] checking fs roots                        (0:00:00 elapsed, 104 items checked)
[5/7] checking csums (without verifying data)  (0:00:00 elapsed, 205 items checked)
[6/7] checking root refs                       (0:00:00 elapsed, 3 items checked)
[7/7] checking quota groups skipped (not enabled on this FS)
found 47394816 bytes used, no error found
total csum bytes: 44268
total tree bytes: 2064384
total fs tree bytes: 1720320
total extent tree bytes: 180224
btree space waste bytes: 465350
file data blocks allocated: 45330432
 referenced 45330432

Fabio M. De Francesco (3):
  btrfs: Replace kmap() with kmap_local_page() in inode.c
  btrfs: Replace kmap() with kmap_local_page() in lzo.c
  btrfs: Replace kmap() with kmap_local_page() in zlib.c

 fs/btrfs/inode.c |  6 +++---
 fs/btrfs/lzo.c   | 28 ++++++++++++----------------
 fs/btrfs/zlib.c  | 40 ++++++++++++++++++++--------------------
 3 files changed, 35 insertions(+), 39 deletions(-)

-- 
2.36.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-06-06 14:33 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31 14:53 [PATCH 0/3] btrfs: Replace kmap() with kmap_local_page() Fabio M. De Francesco
2022-05-31 14:53 ` [PATCH 1/3] btrfs: Replace kmap() with kmap_local_page() in inode.c Fabio M. De Francesco
2022-05-31 15:46   ` Christoph Hellwig
2022-05-31 14:53 ` [PATCH 2/3] btrfs: Replace kmap() with kmap_local_page() in lzo.c Fabio M. De Francesco
2022-05-31 15:53   ` Christoph Hellwig
2022-05-31 14:53 ` [PATCH 3/3] btrfs: Replace kmap() with kmap_local_page() in zlib.c Fabio M. De Francesco
2022-05-31 15:53   ` Christoph Hellwig
2022-05-31 20:35   ` kernel test robot
2022-06-01 19:57     ` Fabio M. De Francesco
2022-06-06 12:11   ` Dan Carpenter
2022-06-01 13:25 ` [PATCH 0/3] btrfs: Replace kmap() with kmap_local_page() David Sterba
2022-06-02 16:22   ` Ira Weiny
2022-06-02 16:46     ` Matthew Wilcox
2022-06-02 18:01   ` Fabio M. De Francesco
2022-06-02 15:20 ` Christoph Hellwig
2022-06-02 15:55   ` Ira Weiny
2022-06-02 16:28   ` David Sterba
2022-06-05 15:11     ` Fabio M. De Francesco
2022-06-06 10:32       ` David Sterba
2022-06-06 14:32         ` Fabio M. De Francesco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).