From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, senozhatsky@chromium.org,
minchan@kernel.org, axboe@kernel.dk, hch@lst.de,
akpm@linux-foundation.org
Subject: [merged mm-stable] zram-dont-use-highmem-for-the-bounce-buffer-in-zram_bvec_readwrite.patch removed from -mm tree
Date: Tue, 18 Apr 2023 16:34:46 -0700 [thread overview]
Message-ID: <20230418233447.17717C433EF@smtp.kernel.org> (raw)
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 <hch@lst.de>
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.
Link: https://lkml.kernel.org/r/20230411171459.567614-9-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/block/zram/zram_drv.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
--- a/drivers/block/zram/zram_drv.c~zram-dont-use-highmem-for-the-bounce-buffer-in-zram_bvec_readwrite
+++ a/drivers/block/zram/zram_drv.c
@@ -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 *z
if (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 hch@lst.de 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
reply other threads:[~2023-04-18 23:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230418233447.17717C433EF@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=senozhatsky@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.