lkml.org 
[lkml]   [2011]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC 5/8] compaction: remove active list counting
    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@jp.fujitsu.com>
    > Cc: Mel Gorman <mgorman@suse.de>
    > Cc: Rik van Riel <riel@redhat.com>
    > Cc: Andrea Arcangeli <aarcange@redhat.com>
    > Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
    > ---
    > 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?


    \
     
     \ /
      Last update: 2011-04-28 11:01    [W:0.083 / U:340.588 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site