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?

转载于:https://www.cnblogs.com/baiyw/p/4648644.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值