Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-13 Thread Michal Hocko
On Mon 13-08-12 12:05:38, Glauber Costa wrote: > On 08/10/2012 10:54 PM, Michal Hocko wrote: > > On Thu 09-08-12 17:01:10, Glauber Costa wrote: > >> From: Suleiman Souhlal > >> > >> mem_cgroup_do_charge() was written before kmem accounting, and expects > >> three cases: being called for 1 page, be

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-13 Thread Glauber Costa
On 08/10/2012 10:54 PM, Michal Hocko wrote: > On Thu 09-08-12 17:01:10, Glauber Costa wrote: >> From: Suleiman Souhlal >> >> mem_cgroup_do_charge() was written before kmem accounting, and expects >> three cases: being called for 1 page, being called for a stock of 32 >> pages, or being called for

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-10 Thread Michal Hocko
On Thu 09-08-12 17:01:10, Glauber Costa wrote: > From: Suleiman Souhlal > > mem_cgroup_do_charge() was written before kmem accounting, and expects > three cases: being called for 1 page, being called for a stock of 32 > pages, or being called for a hugepage. If we call for 2 or 3 pages (and > bo

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-10 Thread Michal Hocko
On Fri 10-08-12 19:30:00, Michal Hocko wrote: > On Thu 09-08-12 17:01:10, Glauber Costa wrote: > [...] > > For now retry up to COSTLY_ORDER (as page_alloc.c does) and make sure > > not to do it if __GFP_NORETRY. > > Who is using __GFP_NORETRY for user backed memory (except for hugetlb > which has

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-10 Thread Kamezawa Hiroyuki
(2012/08/11 2:28), Michal Hocko wrote: On Sat 11-08-12 01:49:25, KAMEZAWA Hiroyuki wrote: (2012/08/11 0:42), Michal Hocko wrote: On Thu 09-08-12 17:01:10, Glauber Costa wrote: [...] @@ -2317,18 +2318,18 @@ static int mem_cgroup_do_charge(struct mem_cgroup *memcg, gfp_t gfp_mask, } els

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-10 Thread Michal Hocko
On Thu 09-08-12 17:01:10, Glauber Costa wrote: [...] > For now retry up to COSTLY_ORDER (as page_alloc.c does) and make sure > not to do it if __GFP_NORETRY. Who is using __GFP_NORETRY for user backed memory (except for hugetlb which has its own controller)? -- Michal Hocko SUSE Labs -- To unsub

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-10 Thread Michal Hocko
On Sat 11-08-12 01:49:25, KAMEZAWA Hiroyuki wrote: > (2012/08/11 0:42), Michal Hocko wrote: > >On Thu 09-08-12 17:01:10, Glauber Costa wrote: > >[...] > >>@@ -2317,18 +2318,18 @@ static int mem_cgroup_do_charge(struct mem_cgroup > >>*memcg, gfp_t gfp_mask, > >>} else > >>mem_over_l

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-10 Thread Kamezawa Hiroyuki
(2012/08/11 0:42), Michal Hocko wrote: On Thu 09-08-12 17:01:10, Glauber Costa wrote: [...] @@ -2317,18 +2318,18 @@ static int mem_cgroup_do_charge(struct mem_cgroup *memcg, gfp_t gfp_mask, } else mem_over_limit = mem_cgroup_from_res_counter(fail_res, res); /* -

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-10 Thread Michal Hocko
On Thu 09-08-12 17:01:10, Glauber Costa wrote: [...] > @@ -2317,18 +2318,18 @@ static int mem_cgroup_do_charge(struct mem_cgroup > *memcg, gfp_t gfp_mask, > } else > mem_over_limit = mem_cgroup_from_res_counter(fail_res, res); > /* > - * nr_pages can be either a huge

[PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-09 Thread Glauber Costa
From: Suleiman Souhlal mem_cgroup_do_charge() was written before kmem accounting, and expects three cases: being called for 1 page, being called for a stock of 32 pages, or being called for a hugepage. If we call for 2 or 3 pages (and both the stack and several slabs used in process creation are