aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMichal Hocko <[email protected]>2013-02-22 16:32:30 -0800
committerLinus Torvalds <[email protected]>2013-02-23 17:50:10 -0800
commita394cb8ee632ec5edce20309901ec66767497a43 (patch)
treef1b02c0329a8614810efe5a1f45f51ae64d46d33 /tools/perf/scripts/python
parent4ca3a69bcb6875c3f20802522c1b4fc56bb14608 (diff)
memcg,vmscan: do not break out targeted reclaim without reclaimed pages
Targeted (hard resp soft) reclaim has traditionally tried to scan one group with decreasing priority until nr_to_reclaim (SWAP_CLUSTER_MAX pages) is reclaimed or all priorities are exhausted. The reclaim is then retried until the limit is met. This approach, however, doesn't work well with deeper hierarchies where groups higher in the hierarchy do not have any or only very few pages (this usually happens if those groups do not have any tasks and they have only re-parented pages after some of their children is removed). Those groups are reclaimed with decreasing priority pointlessly as there is nothing to reclaim from them. An easiest fix is to break out of the memcg iteration loop in shrink_zone only if the whole hierarchy has been visited or sufficient pages have been reclaimed. This is also more natural because the reclaimer expects that the hierarchy under the given root is reclaimed. As a result we can simplify the soft limit reclaim which does its own iteration. [[email protected]: break out of the hierarchy loop only if nr_reclaimed exceeded nr_to_reclaim] [[email protected]: use conventional comparison order] Signed-off-by: Michal Hocko <[email protected]> Reported-by: Ying Han <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Glauber Costa <[email protected]> Cc: Li Zefan <[email protected]> Signed-off-by: Ying Han <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions