1. 09 2月, 2022 27 次提交
  2. 08 2月, 2022 1 次提交
  3. 29 1月, 2022 1 次提交
  4. 26 1月, 2022 3 次提交
    • L
      etmem: Add a scan flag to support specified page swap-out · 353db299
      liubo 提交于
      euleros inclusion
      category: feature
      bugzilla: https://gitee.com/openeuler/kernel/issues/I4QVXW
      CVE: NA
      
      -------------------------------------------------
      etmem, the memory vertical expansion technology,
      
      The existing memory expansion tool etmem swaps out all pages that can be
      swapped out for the process by default, unless the page is marked with
      lock flag.
      
      The function of swapping out specified pages is added. The process adds
      VM_SWAPFLAG flags for pages to be swapped out. The etmem adds filters to
      the scanning module and swaps out only these pages.
      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: NYang Yingliang <yangyingliang@huawei.com>
      353db299
    • L
      etmem: add swapcache reclaim to etmem · d2869c60
      liubo 提交于
      euleros inclusion
      category: feature
      bugzilla: https://gitee.com/openeuler/kernel/issues/I4QVXW
      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: NYang Yingliang <yangyingliang@huawei.com>
      d2869c60
    • L
      etmem: add original kernel swap enabled options · 44983705
      liubo 提交于
      euleros inclusion
      category: feature
      bugzilla: https://gitee.com/openeuler/kernel/issues/I4QVXW
      CVE: NA
      
      -------------------------------------------------
      
      etmem, the memory vertical expansion technology,
      uses DRAM and high-performance storage new media to form multi-level
      memory storage.
      By grading the stored data, etmem migrates the classified cold
      storage data from the storage medium to the high-performance
      storage medium,
      so as to achieve the purpose of memory capacity expansion and
      memory cost reduction.
      
      When the memory expansion function etmem is running, the native
      swap function of the kernel needs to be disabled in certain
      scenarios to avoid the impact of kernel swap.
      
      This feature provides the preceding functions.
      
      The /sys/kernel/mm/swap/ directory provides the kernel_swap_enable
      sys interface to enable or disable the native swap function
      of the kernel.
      
      The default value of /sys/kernel/mm/swap/kernel_swap_enable is true,
      that is, kernel swap is enabled by default.
      
      Turn on kernel swap:
      	echo true > /sys/kernel/mm/swap/kernel_swap_enable
      
      Turn off kernel swap:
      	echo false > /sys/kernel/mm/swap/kernel_swap_enable
      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: NYang Yingliang <yangyingliang@huawei.com>
      44983705
  5. 17 1月, 2022 4 次提交
  6. 31 12月, 2021 1 次提交
    • Z
      mm: export collect_procs() · bb784b81
      Zhang Jian 提交于
      ascend inclusion
      category: feature
      bugzilla: https://gitee.com/openeuler/kernel/issues/I4OXH9
      CVE: NA
      
      -------------------------------------------------
      
      Collect the processes who have the page mapped via collect_procs().
      
      @page if the page is a part of the hugepages/compound-page, we must
      using compound_head() to find it's head page to prevent the kernel panic,
      and make the page be locked.
      
      @to_kill the function will return a linked list, when we have used
      this list, we must kfree the list.
      
      @force_early if we want to find all process, we must make it be true, if
      it's false, the function will only return the process who have PF_MCE_PROCESS
      or PF_MCE_EARLY mark.
      
      limits: if force_early is true, sysctl_memory_failure_early_kill is useless.
      If it's false, no process have PF_MCE_PROCESS and PF_MCE_EARLY flag, and
      the sysctl_memory_failure_early_kill is enabled, function will return all tasks
      whether the task have the PF_MCE_PROCESS and PF_MCE_EARLY flag.
      Signed-off-by: NZhang Jian <zhangjian210@huawei.com>
      Reviewed-by: NWeilong Chen <chenweilong@huawei.com>
      Reviewed-by: Kefeng Wang<wangkefeng.wang@huawei.com>
      Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
      bb784b81
  7. 30 12月, 2021 2 次提交
  8. 28 12月, 2021 1 次提交