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/20231006060245.7411-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: 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>
This commit is contained in:
parent
fa819c7433
commit
33247c3931
1 changed files with 1 additions and 1 deletions
|
@ -2015,7 +2015,7 @@ static int zs_page_migrate(struct address_space *mapping, struct page *newpage,
|
|||
* 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 + pos;
|
||||
|
|
Loading…
Add table
Reference in a new issue