[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 7 Jul 2022 23:17:33 +0200
From: David Sterba <dsterba@...e.cz>
To: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
Nick Terrell <terrelln@...com>,
Chris Down <chris@...isdown.name>, Qu Wenruo <wqu@...e.com>,
Filipe Manana <fdmanana@...e.com>,
Gabriel Niebler <gniebler@...e.com>,
linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
Ira Weiny <ira.weiny@...el.com>
Subject: Re: [PATCH] btrfs: Convert zlib_compress_pages() to use
kmap_local_page()
On Mon, Jun 27, 2022 at 06:33:05PM +0200, Fabio M. De Francesco wrote:
> The use of kmap() is being deprecated in favor of kmap_local_page(). With
> kmap_local_page(), the mapping is per thread, CPU local and not globally
> visible.
>
> Therefore, use kmap_local_page() / kunmap_local() in zlib_compress_pages()
> because in this function the mappings are per thread and are not visible
> in other contexts. Furthermore, drop the mappings of "out_page" which is
> allocated within zlib_compress_pages() with alloc_page(GFP_NOFS) and use
> page_address() (thanks to David Sterba).
>
> Tested with xfstests on a QEMU + KVM 32-bits VM with 4GB of RAM booting
> a kernel with HIGHMEM64G enabled. This patch passes 26/26 tests of group
> "compress".
>
> Cc: Qu Wenruo <wqu@...e.com>
> Suggested-by: David Sterba <dsterba@...e.com>
> Suggested-by: Ira Weiny <ira.weiny@...el.com>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
Added to the kmap patch queue, thanks.
Powered by blists - more mailing lists