On Thu, Sep 9, 2010 at 6:19 AM, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: > On Thu, 9 Sep 2010 00:45:27 +0900 > Minchan Kim <minchan.kim@xxxxxxxxx> wrote: > >> +static inline bool zone_reclaimable(struct zone *zone) >> +{ >> + return zone->pages_scanned < zone_reclaimable_pages(zone) * 6; >> +} >> + >> +static inline bool all_unreclaimable(struct zonelist *zonelist, >> + struct scan_control *sc) >> +{ >> + struct zoneref *z; >> + struct zone *zone; >> + bool all_unreclaimable = true; >> + >> + if (!scanning_global_lru(sc)) >> + return false; >> + >> + for_each_zone_zonelist_nodemask(zone, z, zonelist, >> + gfp_zone(sc->gfp_mask), sc->nodemask) { >> + if (!populated_zone(zone)) >> + continue; >> + if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL)) >> + continue; >> + if (zone_reclaimable(zone)) { >> + all_unreclaimable = false; >> + break; >> + } >> + } >> + >> return all_unreclaimable; >> } > > Could we have some comments over these functions please? Why they > exist, what problem they solve, how they solve them, etc. Stuff which > will be needed for maintaining this code three years from now. > > We may as well remove the `inline's too. gcc will tkae care of that