Re: [PATCH 02/09] memcg: make inactive_anon_is_low()

KOSAKI Motohiro
2008-11-30T14:00:06Z

> | +static void mem_cgroup_set_inactive_ratio(struct mem_cgroup *memcg)
> | +{
> | + unsigned int gb, ratio;
> | +
> | + gb = res_counter_read_u64(&memcg->res, RES_LIMIT) >> 30;
> | + ratio = int_sqrt(10 * gb);
> | + if (!ratio)
> | + ratio = 1;
>
> Hi Kosaki,
>
> maybe better would be
>
> gb = ...;
> if (gb) {
> ratio = int_sqrt(10 * gb);
> } else
> ratio = 1;
>

Will fix.
Thanks.

Actually, setup_per_zone_inactive_ratio() (it calcule for global
reclaim) also have the same non-easy review thning.

I also fix it later.