Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-07 Thread TSUKADA Koutaro
On 2018/05/04 13:26, Mike Kravetz wrote: > Thank you for the explanation of your use case. I now understand what > you were trying to accomplish with your patch. > > Your use case reminds me of the session at LSFMM titled "swap accounting". > https://lwn.net/Articles/753162/ > > I hope someone

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-07 Thread TSUKADA Koutaro
On 2018/05/04 13:26, Mike Kravetz wrote: > Thank you for the explanation of your use case. I now understand what > you were trying to accomplish with your patch. > > Your use case reminds me of the session at LSFMM titled "swap accounting". > https://lwn.net/Articles/753162/ > > I hope someone

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-03 Thread Mike Kravetz
On 05/03/2018 05:09 PM, TSUKADA Koutaro wrote: > On 2018/05/03 11:33, Mike Kravetz wrote: >> On 05/01/2018 11:54 PM, TSUKADA Koutaro wrote: >>> On 2018/05/02 13:41, Mike Kravetz wrote: What is the reason for not charging pages at allocation/reserve time? I am not an expert in memcg

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-03 Thread Mike Kravetz
On 05/03/2018 05:09 PM, TSUKADA Koutaro wrote: > On 2018/05/03 11:33, Mike Kravetz wrote: >> On 05/01/2018 11:54 PM, TSUKADA Koutaro wrote: >>> On 2018/05/02 13:41, Mike Kravetz wrote: What is the reason for not charging pages at allocation/reserve time? I am not an expert in memcg

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-03 Thread TSUKADA Koutaro
On 2018/05/03 11:33, Mike Kravetz wrote: > On 05/01/2018 11:54 PM, TSUKADA Koutaro wrote: >> On 2018/05/02 13:41, Mike Kravetz wrote: >>> What is the reason for not charging pages at allocation/reserve time? I am >>> not an expert in memcg accounting, but I would think the pages should be >>>

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-03 Thread TSUKADA Koutaro
On 2018/05/03 11:33, Mike Kravetz wrote: > On 05/01/2018 11:54 PM, TSUKADA Koutaro wrote: >> On 2018/05/02 13:41, Mike Kravetz wrote: >>> What is the reason for not charging pages at allocation/reserve time? I am >>> not an expert in memcg accounting, but I would think the pages should be >>>

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-02 Thread Mike Kravetz
On 05/01/2018 11:54 PM, TSUKADA Koutaro wrote: > On 2018/05/02 13:41, Mike Kravetz wrote: >> What is the reason for not charging pages at allocation/reserve time? I am >> not an expert in memcg accounting, but I would think the pages should be >> charged at allocation time. Otherwise, a task

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-02 Thread Mike Kravetz
On 05/01/2018 11:54 PM, TSUKADA Koutaro wrote: > On 2018/05/02 13:41, Mike Kravetz wrote: >> What is the reason for not charging pages at allocation/reserve time? I am >> not an expert in memcg accounting, but I would think the pages should be >> charged at allocation time. Otherwise, a task

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-02 Thread TSUKADA Koutaro
On 2018/05/02 13:41, Mike Kravetz wrote: > What is the reason for not charging pages at allocation/reserve time? I am > not an expert in memcg accounting, but I would think the pages should be > charged at allocation time. Otherwise, a task could allocate a large number > of (reserved) pages

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-02 Thread TSUKADA Koutaro
On 2018/05/02 13:41, Mike Kravetz wrote: > What is the reason for not charging pages at allocation/reserve time? I am > not an expert in memcg accounting, but I would think the pages should be > charged at allocation time. Otherwise, a task could allocate a large number > of (reserved) pages

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-01 Thread Mike Kravetz
On 05/01/2018 06:19 PM, TSUKADA Koutaro wrote: > If nr_overcommit_hugepages is assumed to be infinite, allocating pages for > hugetlb's overcommit from buddy pool is all unlimited even if being limited > by memcg. The purpose of this patch is that if we allocate the hugetlb page > from the boddy

Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-01 Thread Mike Kravetz
On 05/01/2018 06:19 PM, TSUKADA Koutaro wrote: > If nr_overcommit_hugepages is assumed to be infinite, allocating pages for > hugetlb's overcommit from buddy pool is all unlimited even if being limited > by memcg. The purpose of this patch is that if we allocate the hugetlb page > from the boddy

[PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-01 Thread TSUKADA Koutaro
If nr_overcommit_hugepages is assumed to be infinite, allocating pages for hugetlb's overcommit from buddy pool is all unlimited even if being limited by memcg. The purpose of this patch is that if we allocate the hugetlb page from the boddy pool, that means we should charge it to memcg. A

[PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-01 Thread TSUKADA Koutaro
If nr_overcommit_hugepages is assumed to be infinite, allocating pages for hugetlb's overcommit from buddy pool is all unlimited even if being limited by memcg. The purpose of this patch is that if we allocate the hugetlb page from the boddy pool, that means we should charge it to memcg. A