[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f11576a0902101241j5a006e09w46ecdbdb9c77e081@mail.gmail.com>
Date: Wed, 11 Feb 2009 05:41:21 +0900
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Johannes Weiner <hannes@...xchg.org>
Cc: MinChan Kim <minchan.kim@...il.com>,
Rik van Riel <riel@...hat.com>,
"Rafael J. Wysocki" <rjw@...k.pl>,
William Lee Irwin III <wli@...ementarian.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] shrink_all_memory() use sc.nr_reclaimed
>> {
>> struct zone *zone;
>> - unsigned long nr_to_scan, ret = 0;
>> + unsigned long nr_to_scan;
>> enum lru_list l;
>
> Basing it on swsusp-clean-up-shrink_all_zones.patch probably makes it
> easier for Andrew to pick it up.
ok, thanks.
>> reclaim_state.reclaimed_slab = 0;
>> - shrink_slab(nr_pages, sc.gfp_mask, global_lru_pages());
>> - ret += reclaim_state.reclaimed_slab;
>> - } while (ret < nr_pages && reclaim_state.reclaimed_slab > 0);
>> + shrink_slab(nr_pages, sc.gfp_mask,
>> + global_lru_pages());
>> + sc.nr_reclaimed += reclaim_state.reclaimed_slab;
>> + } while (sc.nr_reclaimed < nr_pages &&
>> + reclaim_state.reclaimed_slab > 0);
>
> :(
>
> Is this really an improvement? `ret' is better to read than
> `sc.nr_reclaimed'.
I know it's debetable thing.
but I still think code consistency is important than variable name preference.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists