]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "mm: vmscan: fix misused nr_reclaimed in shrink_mem_cgroup_zone()"
authorYing Han <yinghan@google.com>
Thu, 12 Apr 2012 19:49:16 +0000 (12:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Apr 2012 20:12:12 +0000 (13:12 -0700)
commit92add34e336585abca7d6f755a200828ca4dc362
tree5bbfded1934fc94facbfa892a59874703aa6922a
parent091e0c2138269f9454be1a98cf0c1bd45ec9c2d9
Revert "mm: vmscan: fix misused nr_reclaimed in shrink_mem_cgroup_zone()"

This reverts commit 4a05668bac4a0fcaa376fc46310bb90a7cbcb2b3.

Before the commit, the code makes senses to me but not after the commit.
The "nr_reclaimed" is the number of pages reclaimed by scanning through
the memcg's lru lists.  The "nr_to_reclaim" is the target value for the
whole function.  For example, we like to early break the reclaim if
reclaimed 32 pages under direct reclaim (not DEF_PRIORITY).

After the reverted commit, the target "nr_to_reclaim" is decremented each
time by "nr_reclaimed" but we still use it to compare the "nr_reclaimed".
It just doesn't make sense to me...

Signed-off-by: Ying Han <yinghan@google.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c