Messages in this thread | | | Date | Wed, 11 Feb 2009 05:41:21 +0900 | Subject | Re: [PATCH] shrink_all_memory() use sc.nr_reclaimed | From | KOSAKI Motohiro <> |
| |
>> { >> 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.
| |