On Mon, 18 Dec 2006 17:18:12 -0800 (PST) David Rientjes <rientjes at cs.washington.edu> wrote: > On Mon, 18 Dec 2006, Andrew Morton wrote: > > > diff -puN mm/vmscan.c~shrink_all_memory-fix-lru_pages-handling mm/vmscan.c > > --- a/mm/vmscan.c~shrink_all_memory-fix-lru_pages-handling > > +++ a/mm/vmscan.c > > @@ -1484,6 +1484,16 @@ static unsigned long shrink_all_zones(un > > return ret; > > } > > > > +static unsigned long count_lru_pages(void) > > +{ > > + struct zone *zone; > > + unsigned long ret = 0; > > + > > + for_each_zone(zone); > > + ret += zone->nr_active + zone->nr_inactive; > > + return ret; > > +} > > + > > /* > > * Try to free `nr_pages' of memory, system-wide, and return the number of > > * freed pages. > > There's an extra semicolon there Sigh. coding-while-diseased. > that results in only the final zone being > used. > Actually it'll go oops. Fixed, thanks.