Commit a8576876 authored by Jingxian He's avatar Jingxian He Committed by Zheng Zengkai
Browse files

mm/pin_mem: improve pin mem pages rmap and free method

euleros inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4QPBH


CVE: NA

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

1. Improve pin mem pages rmap:
Add Hotreplace flag for pin mem pages to avoid spilting.
When the Hotreplace flag is set, the page will not be
added to deferred_split page list during rmap.
If the pin mem pages added to the deferred_split page list,
deferred_split_scan ops will spilt the pages which has been pinned.
If the pin mem page is spilted, we can't remap the page to the recover
process with the recorded pin mem mapping rule.
Moreover, the deferred_split page list node can be corrupted while the
deferred_split_scan function and pin pages remapping executing at the
same time.

2. Improve free method for pin mem pages:
Use the put_page method instead of free_pages directly.

Signed-off-by: default avatarJingxian He <hejingxian@huawei.com>
Reviewed-by: default avatarKefeng <Wang&lt;wangkefeng.wang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 2cef14da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment