Re: [PATCH 02/09] memcg: make inactive_anon_is_low()
- From: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
- Date: Sun, 30 Nov 2008 15:25:54 +0300
[KOSAKI Motohiro - Sun, Nov 30, 2008 at 07:56:37PM +0900]
| make inactive_anon_is_low for memcgroup.
| it improve active_anon vs inactive_anon ratio balancing.
|
|
| Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
| ---
...
| +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;
| +
| + memcg->inactive_ratio = ratio;
| +
| +}
| +
...
- Cyrill -
--
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/
- Follow-Ups:
- Re: [PATCH 02/09] memcg: make inactive_anon_is_low()
- From: KOSAKI Motohiro
- Re: [PATCH 02/09] memcg: make inactive_anon_is_low()
- 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
- [PATCH 00/09] memcg: split-lru feature for memcg
- Prev by Date: [PATCH] fix pktcdvd breakage from commit e105b8bfc769b0545b6f0f395179d1e43cbee822
- Next by Date: Re: linux-next: WARNING: at fs/sysfs/dir.c:425 sysfs_add_one+0x31/0x7a()
- Previous by thread: [PATCH 02/09] memcg: make inactive_anon_is_low()
- Next by thread: Re: [PATCH 02/09] memcg: make inactive_anon_is_low()
- Index(es):