On Tue, 2019-02-26 at 15:04 +0300, Andrey Ryabinin wrote: > I think we should leave anon aging only for !SCAN_FILE cases. > At least aging was definitely invented for the SCAN_FRACT mode which > was the > main mode at the time it was added by the commit: > and I think would be reasonable to avoid the anon aging in the > SCAN_FILE case. > Because if workload generates enough inactive file pages we never go > to the SCAN_FRACT, > so aging is just as useless as with no swap case. There are a few different cases here. If you NEVER end up scanning or evicting anonymous pages, scanning them is indeed a waste of time. However, if you occasionally end pushing something into swap, it is very useful to know that the pages that did get pushed to swap had been sitting on the inactive list for a very long time, and had not been used in that time. To limit the amount of wasted work, only SWAP_CLUSTER_MAX pages are moved from the active_anon list to the inactive_anon list at a time. I suppose that could be gated behind a check whether or not the system has swap space configured, so no anon pages are ever scanned if the system has no swap space. -- All Rights Reversed.