• L
    etmem: add swapcache reclaim to etmem · 60645a99
    liubo 提交于
    euleros inclusion
    category: feature
    bugzilla: https://gitee.com/openeuler/kernel/issues/I5DC4A
    CVE: NA
    
    -------------------------------------------------
    etmem, the memory vertical expansion technology,
    
    In the current etmem process, memory page swapping is implemented by
    invoking shrink_page_list. When this interface is invoked for the first
    time, pages are added to the swap cache and written to disks.The swap
    cache page is reclaimed only when this interface is invoked for the
    second time and no process accesses the page.However, in the etmem
    process, the user mode scans pages that have been accessed, and the
    migration is not delivered to pages that are not accessed by processes.
    Therefore, the swap cache may always be occupied.
    To solve the preceding problem, add the logic for actively reclaiming
    the swap cache.When the swap cache occupies a large amount of memory,
    the system proactively scans the LRU linked list and reclaims the
    swap cache to save memory within the specified range.
    Signed-off-by: Nliubo <liubo254@huawei.com>
    Reviewed-by: NMiaohe Lin <linmiaohe@huawei.com>
    Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
    Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
    60645a99
vmscan.c 139.5 KB