On Thu, Apr 28, 2011 at 5:58 PM, Johannes Weiner <hannes@xxxxxxxxxxx> wrote: > On Wed, Apr 27, 2011 at 01:25:22AM +0900, Minchan Kim wrote: >> acct_isolated of compaction uses page_lru_base_type which returns only >> base type of LRU list so it never returns LRU_ACTIVE_ANON or LRU_ACTIVE_FILE. >> So it's pointless to add lru[LRU_ACTIVE_[ANON|FILE]] to get sum. >> >> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> >> Cc: Mel Gorman <mgorman@xxxxxxx> >> Cc: Rik van Riel <riel@xxxxxxxxxx> >> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> >> Signed-off-by: Minchan Kim <minchan.kim@xxxxxxxxx> >> --- >> Âmm/compaction.c | Â Â4 ++-- >> Â1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/mm/compaction.c b/mm/compaction.c >> index 9f80b5a..653b02b 100644 >> --- a/mm/compaction.c >> +++ b/mm/compaction.c >> @@ -219,8 +219,8 @@ static void acct_isolated(struct zone *zone, struct compact_control *cc) >> Â Â Â Â Â Â Â count[lru]++; >> Â Â Â } >> >> - Â Â cc->nr_anon = count[LRU_ACTIVE_ANON] + count[LRU_INACTIVE_ANON]; >> - Â Â cc->nr_file = count[LRU_ACTIVE_FILE] + count[LRU_INACTIVE_FILE]; >> + Â Â cc->nr_anon = count[LRU_INACTIVE_ANON]; >> + Â Â cc->nr_file = count[LRU_INACTIVE_FILE]; >> Â Â Â __mod_zone_page_state(zone, NR_ISOLATED_ANON, cc->nr_anon); >> Â Â Â __mod_zone_page_state(zone, NR_ISOLATED_FILE, cc->nr_file); >> Â} > > I don't see anything using cc->nr_anon and cc->nr_file outside this > code. ÂWould it make sense to remove them completely? > Good idea. I will remove it totally in next version. Thanks, Hannes. -- Kind regards, Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href