lkml.org 
[lkml]   [2009]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] shrink_all_memory() use sc.nr_reclaimed
From
>>  {
>> 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.


\
 
 \ /
  Last update: 2009-02-10 21:43    [W:0.259 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site