Re: [PATCH 2/8] memcg: easy check routine for reclaimable

From: Hiroyuki Kamezawa
Date: Fri May 20 2011 - 19:58:09 EST


2011/5/21 Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>:
> On Fri, 20 May 2011 12:42:12 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
>
>> +bool mem_cgroup_test_reclaimable(struct mem_cgroup *memcg)
>> +{
>> +     unsigned long nr;
>> +     int zid;
>> +
>> +     for (zid = NODE_DATA(0)->nr_zones - 1; zid >= 0; zid--)
>> +             if (mem_cgroup_zone_reclaimable_pages(memcg, 0, zid))
>> +                     break;
>> +     if (zid < 0)
>> +             return false;
>> +     return true;
>> +}
>
> A wee bit of documentation would be nice.

Yes, I'll add some.

>  Perhaps improving the name
> would suffice: mem_cgroup_has_reclaimable().
>
ok, I will use that name.

-Kame
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/