• J
    mm/pin_mem: improve pin mem pages rmap and free method · a8576876
    Jingxian He 提交于
    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: NJingxian He <hejingxian@huawei.com>
    Reviewed-by: Kefeng Wang<wangkefeng.wang@huawei.com>
    Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
    a8576876
pin_mem.c 30.9 KB