zram-dont-use-highmem-for-the-bounce-buffer-in-zram_bvec_readwrite.patch removed from -mm tree
The quilt patch titled
Subject: zram: don't use highmem for the bounce buffer in zram_bvec_{read,write}has been removed from the -mm tree. Its filename was
zram-dont-use-highmem-for-the-bounce-buffer-in-zram_bvec_readwrite.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Christoph Hellwig <[email protected]>
Subject: zram: don't use highmem for the bounce buffer in zram_bvec_{read,write}
Date: Tue, 11 Apr 2023 19:14:50 +0200
There is no point in allocation a highmem page when we instantly need to copy from it.
---
drivers/block/zram/zram_drv.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-)
drivers/block/zram/zram_drv.c renamed from drivers/block/zram/zram_drv.c~zram-dont-use-highmem-for-the-bounce-buffer-in-zram_bvec_readwrite +5 -12
@@ -1431,7 +1431,7 @@ static int zram_bvec_read(struct zram *z page = bvec->bv_page;if (is_partial_io (bvec)) {/* Use a temporary buffer to decompress the page */ - page =alloc_page (GFP_NOIO |__GFP_HIGHMEM); + page =alloc_page (GFP_NOIO );if (!page)return -ENOMEM ; }
@@ -1440,12 +1440,8 @@ static int zram_bvec_read(struct zram *zif (unlikely (ret)) goto out; -if (is_partial_io (bvec)) { -void *src =kmap_atomic (page); - -memcpy_to_bvec (bvec, src + offset); -kunmap_atomic (src); - } +if (is_partial_io (bvec)) +memcpy_to_bvec (bvec,page_address (page) + offset); out:if (is_partial_io (bvec))__free_page (page);
@@ -1589,12 +1585,11 @@ static int zram_bvec_write(struct zram * vec = *bvec;if (is_partial_io (bvec)) { -void *dst;/* * This is a partial IO. We need to read the full page * before to write the changes. */ - page =alloc_page (GFP_NOIO |__GFP_HIGHMEM); + page =alloc_page (GFP_NOIO );if (!page)return -ENOMEM ;
@@ -1602,9 +1597,7 @@ static int zram_bvec_write(struct zram *if (ret) goto out; - dst =kmap_atomic (page); -memcpy_from_bvec (dst + offset, bvec); -kunmap_atomic (dst); +memcpy_from_bvec (page_address (page) + offset, bvec);bvec_set_page (&vec, page,PAGE_SIZE ,0 ); }
_
Patches currently in -mm which might be from [email protected] are
zram-rename-__zram_bvec_read-to-zram_read_page.patch zram-directly-call-zram_read_page-in-writeback_store.patch zram-refactor-zram_bdev_read.patch zram-dont-pass-a-bvec-to-__zram_bvec_write.patch zram-refactor-zram_bdev_write.patch zram-pass-a-page-to-read_from_bdev.patch zram-dont-return-errors-from-read_from_bdev_async.patch zram-fix-synchronous-reads.patch zram-return-errors-from-read_from_bdev_sync.patch