Commit 444ec524 authored by ZhangPeng's avatar ZhangPeng Committed by Ma Wupeng
Browse files

userswap: introduce UFFDIO_COPY_MODE_DIRECT_MAP to map without copying

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I6CAIM



--------------------------------

Add a new UFFDIO_COPY mode UFFDIO_COPY_MODE_DIRECT_MAP to map physical
pages without copy_from_user().
We introduce uswap_unmap_anon_page() to unmap an anonymous page and
uswap_map_anon_page() to map page to src addr. We also introduce
mfill_atomic_pte_nocopy() to achieve zero copy by unmapping src_addr to the
physical page and establishing the mapping from dst_addr to the physical
page.

Signed-off-by: default avatarZhangPeng <zhangpeng362@huawei.com>
parent c098198d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment