Re: [PATCH 02/09] memcg: make inactive_anon_is_low()
- From: "KOSAKI Motohiro" <kosaki.motohiro@xxxxxxxxxxxxxx>
- Date: Sun, 30 Nov 2008 23:00:05 +0900
| +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.
--
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/
- References:
- [PATCH 00/09] memcg: split-lru feature for memcg
- From: KOSAKI Motohiro
- [PATCH 02/09] memcg: make inactive_anon_is_low()
- From: KOSAKI Motohiro
- Re: [PATCH 02/09] memcg: make inactive_anon_is_low()
- From: Cyrill Gorcunov
- [PATCH 00/09] memcg: split-lru feature for memcg
- Prev by Date: Re: v4l2_device/v4l2_subdev: please review (PATCH 1/3)
- Next by Date: Re: [PATCH 02/09] memcg: make inactive_anon_is_low()
- Previous by thread: Re: [PATCH 02/09] memcg: make inactive_anon_is_low()
- Next by thread: Re: [PATCH 02/09] memcg: make inactive_anon_is_low()
- Index(es):
Relevant Pages
|