Skip to content

Commit e301bb4

Browse files
PeikanTsaippajda
authored andcommitted
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/[email protected] Signed-off-by: Mark-PK Tsai <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Cc: AngeloGioacchino Del Regno <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Minchan Kim <[email protected]> Cc: YJ Chiang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: NotZeetaa <[email protected]> Signed-off-by: Pajdek <[email protected]>
1 parent dd817f9 commit e301bb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/zram/zram_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ static int __zram_bvec_read(struct zram *zram, struct page *page, u32 index,
14941494
zram_entry_handle(zram, entry), ZS_MM_RO);
14951495
if (size == PAGE_SIZE) {
14961496
dst = kmap_atomic(page);
1497-
memcpy(dst, src, PAGE_SIZE);
1497+
copy_page(dst, src);
14981498
kunmap_atomic(dst);
14991499
ret = 0;
15001500
} else {

0 commit comments

Comments
 (0)