• sdf


    Sorry for reply late. Yes I noticed Johannes Weiner has recommended this in the discussion thread about commit e82e0561dae9f3ae5 ("mm: vmscan: obey proportional scanning requirements for kswapd")

    http://marc.info/?l=linux-kernel&m=136397130117394&w=2

    but you thought it's out of scope of that series at that moment. But i didn't see this in the upstream git history.

    Yes i see the evolvement of the source code and do believe that the scanning was proportional to the scan target is the right direction and we're already in that direction with current implementation. At the very beginning, you wanted to subtract min from all of LRUs to perform proportional scan and i think this is a very good start and simple and useful enough approxiamtion. And then Johannes Weiner suggersted that swappiness is about page types and comparing the sum of file pages with the sum of anon pages and then knock out the smaller pair would be better.You agreed and implemented it with applying scanned percentage of the smaller pair to the remaining LRUs. But considering the example case mentioned above we will scan even more unproportionally as we cann't guarantee scanning all LRUs 100% evenly.

    I'm still not test this patch and think it's difficult to catch the situation in the example case because mostly we scan LRUs evenly. but i think it's advantage is also obvious because it cover the case mentioned above as well without introducing extra overhead to get indeed proportional.

    Did i miss something?

  • 相关阅读:
    页面生命周期
    设计模式
    算法
    window服务
    Xml
    sql声明变量,及if else语句、while语句的用法
    SQL 使用临时表和临时变量完成update表字段实际案例
    SQL Server遍历表的几种方法
    node快速构建express项目
    词法分析
  • 原文地址:https://www.cnblogs.com/baiyw/p/4648644.html
Copyright © 2020-2023  润新知