diff options
author | Mark-PK Tsai <mark-pk.tsai@mediatek.com> | 2023-10-07 09:05:53 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-02-22 19:24:55 +0100 |
commit | 80ba4caf8ba92bb8f852b5e09251274c11e4b647 (patch) | |
tree | a939339964bc032297292ae2822e93289dfd02de /drivers/block/zram | |
parent | mm/demotion: print demotion targets (diff) | |
download | linux-80ba4caf8ba92bb8f852b5e09251274c11e4b647.tar.xz linux-80ba4caf8ba92bb8f852b5e09251274c11e4b647.zip |
zram: use copy_page for full page copy
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.
Link: https://lkml.kernel.org/r/20231007070554.8657-1-mark-pk.tsai@mediatek.com
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: YJ Chiang <yj.chiang@mediatek.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/block/zram')
-rw-r--r-- | drivers/block/zram/zram_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 6772e0c654fa..242a1fece18d 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1337,7 +1337,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_local_page(page); - memcpy(dst, src, PAGE_SIZE); + copy_page(dst, src); kunmap_local(dst); ret = 0; } else { |