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?

posted @ 2015-07-15 16:06  baihuahua  阅读(272)  评论(0编辑  收藏  举报