mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
zsmalloc: use copy_page for full page copy
Some architectures have implemented optimized copy_page for full page copying, such as arm. On my arm platform, use the copy_page helper for single page copying is about 10 percent faster than memcpy. 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: Matthias Brugger <[email protected]> Cc: Minchan Kim <[email protected]> Cc: YJ Chiang <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
committed by
Andrew Morton
parent
bafd7e9d35
commit
afb2d666d0
+1
-1
@@ -1839,7 +1839,7 @@ static int zs_page_migrate(struct page *newpage, struct page *page,
|
||||
* Here, any user cannot access all objects in the zspage so let's move.
|
||||
*/
|
||||
d_addr = kmap_atomic(newpage);
|
||||
memcpy(d_addr, s_addr, PAGE_SIZE);
|
||||
copy_page(d_addr, s_addr);
|
||||
kunmap_atomic(d_addr);
|
||||
|
||||
for (addr = s_addr + offset; addr < s_addr + PAGE_SIZE;
|
||||
|
||||
Reference in New Issue
Block a user