Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-16 Thread Kamezawa Hiroyuki
(2012/10/12 18:13), Glauber Costa wrote: On 10/12/2012 12:57 PM, Michal Hocko wrote: On Fri 12-10-12 12:44:57, Glauber Costa wrote: On 10/12/2012 12:39 PM, Michal Hocko wrote: On Fri 12-10-12 11:45:46, Glauber Costa wrote: On 10/11/2012 04:42 PM, Michal Hocko wrote: On Mon 08-10-12

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-16 Thread Kamezawa Hiroyuki
(2012/10/12 18:13), Glauber Costa wrote: On 10/12/2012 12:57 PM, Michal Hocko wrote: On Fri 12-10-12 12:44:57, Glauber Costa wrote: On 10/12/2012 12:39 PM, Michal Hocko wrote: On Fri 12-10-12 11:45:46, Glauber Costa wrote: On 10/11/2012 04:42 PM, Michal Hocko wrote: On Mon 08-10-12

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Michal Hocko
On Fri 12-10-12 13:13:04, Glauber Costa wrote: [...] > Just so we don't ping-pong in another submission: > > I changed memcontrol.h's memcg_kmem_newpage_charge to include: > > /* If the test is dying, just let it go. */ > if (unlikely(test_thread_flag(TIF_MEMDIE) >

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Glauber Costa
On 10/12/2012 12:57 PM, Michal Hocko wrote: > On Fri 12-10-12 12:44:57, Glauber Costa wrote: >> On 10/12/2012 12:39 PM, Michal Hocko wrote: >>> On Fri 12-10-12 11:45:46, Glauber Costa wrote: On 10/11/2012 04:42 PM, Michal Hocko wrote: > On Mon 08-10-12 14:06:12, Glauber Costa wrote: >>>

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Michal Hocko
On Fri 12-10-12 12:44:57, Glauber Costa wrote: > On 10/12/2012 12:39 PM, Michal Hocko wrote: > > On Fri 12-10-12 11:45:46, Glauber Costa wrote: > >> On 10/11/2012 04:42 PM, Michal Hocko wrote: > >>> On Mon 08-10-12 14:06:12, Glauber Costa wrote: > > [...] > +/* > + *

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Glauber Costa
On 10/12/2012 12:39 PM, Michal Hocko wrote: > On Fri 12-10-12 11:45:46, Glauber Costa wrote: >> On 10/11/2012 04:42 PM, Michal Hocko wrote: >>> On Mon 08-10-12 14:06:12, Glauber Costa wrote: > [...] + /* + * Conditions under which we can wait for the oom_killer. + *

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Michal Hocko
On Fri 12-10-12 11:45:46, Glauber Costa wrote: > On 10/11/2012 04:42 PM, Michal Hocko wrote: > > On Mon 08-10-12 14:06:12, Glauber Costa wrote: [...] > >> + /* > >> + * Conditions under which we can wait for the oom_killer. > >> + * __GFP_NORETRY should be masked by __mem_cgroup_try_charge, >

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Glauber Costa
On 10/11/2012 04:42 PM, Michal Hocko wrote: > On Mon 08-10-12 14:06:12, Glauber Costa wrote: >> This patch introduces infrastructure for tracking kernel memory pages to >> a given memcg. This will happen whenever the caller includes the flag >> __GFP_KMEMCG flag, and the task belong to a memcg

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Glauber Costa
On 10/11/2012 04:42 PM, Michal Hocko wrote: On Mon 08-10-12 14:06:12, Glauber Costa wrote: This patch introduces infrastructure for tracking kernel memory pages to a given memcg. This will happen whenever the caller includes the flag __GFP_KMEMCG flag, and the task belong to a memcg other than

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Michal Hocko
On Fri 12-10-12 11:45:46, Glauber Costa wrote: On 10/11/2012 04:42 PM, Michal Hocko wrote: On Mon 08-10-12 14:06:12, Glauber Costa wrote: [...] + /* + * Conditions under which we can wait for the oom_killer. + * __GFP_NORETRY should be masked by __mem_cgroup_try_charge, + * but

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Glauber Costa
On 10/12/2012 12:39 PM, Michal Hocko wrote: On Fri 12-10-12 11:45:46, Glauber Costa wrote: On 10/11/2012 04:42 PM, Michal Hocko wrote: On Mon 08-10-12 14:06:12, Glauber Costa wrote: [...] + /* + * Conditions under which we can wait for the oom_killer. + * __GFP_NORETRY should be masked

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Michal Hocko
On Fri 12-10-12 12:44:57, Glauber Costa wrote: On 10/12/2012 12:39 PM, Michal Hocko wrote: On Fri 12-10-12 11:45:46, Glauber Costa wrote: On 10/11/2012 04:42 PM, Michal Hocko wrote: On Mon 08-10-12 14:06:12, Glauber Costa wrote: [...] +/* + * Conditions under which we

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Glauber Costa
On 10/12/2012 12:57 PM, Michal Hocko wrote: On Fri 12-10-12 12:44:57, Glauber Costa wrote: On 10/12/2012 12:39 PM, Michal Hocko wrote: On Fri 12-10-12 11:45:46, Glauber Costa wrote: On 10/11/2012 04:42 PM, Michal Hocko wrote: On Mon 08-10-12 14:06:12, Glauber Costa wrote: [...] +/*

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-12 Thread Michal Hocko
On Fri 12-10-12 13:13:04, Glauber Costa wrote: [...] Just so we don't ping-pong in another submission: I changed memcontrol.h's memcg_kmem_newpage_charge to include: /* If the test is dying, just let it go. */ if (unlikely(test_thread_flag(TIF_MEMDIE)

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-11 Thread Michal Hocko
On Thu 11-10-12 14:42:12, Michal Hocko wrote: [...] > /* >* Keep reference on memcg while the page is charged to prevent >* group from vanishing because allocation can outlive their >* tasks. The reference is dropped in __memcg_kmem_uncharge_page >*/ > >

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-11 Thread Michal Hocko
On Mon 08-10-12 14:06:12, Glauber Costa wrote: > This patch introduces infrastructure for tracking kernel memory pages to > a given memcg. This will happen whenever the caller includes the flag > __GFP_KMEMCG flag, and the task belong to a memcg other than the root. > > In memcontrol.h those

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-11 Thread Michal Hocko
On Mon 08-10-12 14:06:12, Glauber Costa wrote: This patch introduces infrastructure for tracking kernel memory pages to a given memcg. This will happen whenever the caller includes the flag __GFP_KMEMCG flag, and the task belong to a memcg other than the root. In memcontrol.h those functions

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-11 Thread Michal Hocko
On Thu 11-10-12 14:42:12, Michal Hocko wrote: [...] /* * Keep reference on memcg while the page is charged to prevent * group from vanishing because allocation can outlive their * tasks. The reference is dropped in __memcg_kmem_uncharge_page */ please +

[PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-08 Thread Glauber Costa
This patch introduces infrastructure for tracking kernel memory pages to a given memcg. This will happen whenever the caller includes the flag __GFP_KMEMCG flag, and the task belong to a memcg other than the root. In memcontrol.h those functions are wrapped in inline acessors. The idea is to

[PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-08 Thread Glauber Costa
This patch introduces infrastructure for tracking kernel memory pages to a given memcg. This will happen whenever the caller includes the flag __GFP_KMEMCG flag, and the task belong to a memcg other than the root. In memcontrol.h those functions are wrapped in inline acessors. The idea is to