From: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
To: Minchan Kim <minchan@kernel.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Jens Axboe <axboe@kernel.dk>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: <yj.chiang@mediatek.com>,
Mark-PK Tsai <mark-pk.tsai@mediatek.com>,
<linux-kernel@vger.kernel.org>, <linux-block@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>
Subject: [PATCH] zram: use copy_page for full page copy
Date: Sat, 7 Oct 2023 15:05:53 +0800 [thread overview]
Message-ID: <20231007070554.8657-1-mark-pk.tsai@mediatek.com> (raw)
Some architectures, such as arm, have implemented
optimized copy_page for full page copying.
Replace the full page memcpy with copy_page to
take advantage of the optimization.
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index d77d3664ca08..58700dd73d1d 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1338,7 +1338,7 @@ static int zram_read_from_zspool(struct zram *zram, struct page *page,
src = zs_map_object(zram->mem_pool, handle, ZS_MM_RO);
if (size == PAGE_SIZE) {
dst = kmap_atomic(page);
- memcpy(dst, src, PAGE_SIZE);
+ copy_page(dst, src);
kunmap_atomic(dst);
ret = 0;
} else {
--
2.18.0
next reply other threads:[~2023-10-07 7:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 7:05 Mark-PK Tsai [this message]
2023-10-08 4:38 ` Sergey Senozhatsky
2024-02-05 6:43 ` Mark-PK Tsai (蔡沛剛)
2024-02-05 6:48 ` Sergey Senozhatsky
2024-02-05 6:50 ` Sergey Senozhatsky
2024-06-13 0:04 Jisheng Zhang
2024-06-13 3:17 ` Sergey Senozhatsky
2024-06-13 12:58 ` Jisheng Zhang
2024-06-14 5:25 ` Christoph Hellwig
2024-06-14 5:31 ` Sergey Senozhatsky
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=20231007070554.8657-1-mark-pk.tsai@mediatek.com \
--to=mark-pk.tsai@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=axboe@kernel.dk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=minchan@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=yj.chiang@mediatek.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®