lkml.org 
[lkml]   [2011]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/8] memcg: easy check routine for reclaimable
On Fri, 20 May 2011 12:42:12 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> 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. Perhaps improving the name
would suffice: mem_cgroup_has_reclaimable().



\
 
 \ /
  Last update: 2011-05-20 23:53    [W:0.109 / U:2.920 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site