[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7c4dced0-fb54-4336-8bcb-e863187a0d49@ascade.co.jp>
Date: Tue, 8 May 2018 09:35:41 +0900
From: TSUKADA Koutaro <tsukada@...ade.co.jp>
To: Mike Kravetz <mike.kravetz@...cle.com>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Vladimir Davydov <vdavydov.dev@...il.com>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Anshuman Khandual <khandual@...ux.vnet.ibm.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Marc-André Lureau <marcandre.lureau@...hat.com>,
Punit Agrawal <punit.agrawal@....com>,
Dan Williams <dan.j.williams@...el.com>,
Vlastimil Babka <vbabka@...e.cz>,
Andrea Arcangeli <aarcange@...hat.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
cgroups@...r.kernel.org, tsukada@...ade.co.jp
Subject: Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit
will be charged to memcg
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 with more cgroup expertise (Johannes? Aneesh?) can provide
> comments. My experience in that area is limited.
I am waiting for comments from expertise. The point is whether the surplus
hugetlb page that allocated from buddy pool directly should be charged to
memory cgroup or not.
> One question that comes to mind is "Why would the user/application writer
> use hugetlbfs overcommit instead of THP?". For hugetlbfs overcommit, they
> need to be prepared for huge page allocations to fail. So, in some cases
> they may not be able to use any hugetlbfs pages. This is not much different
> than THP. However, in the THP case huge page allocation failures and fall
> back to base pages is transparent to the user. With THP, the normal memory
> cgroup controller should work well.
Certainly THP is much easier to use than hugetlb in 4KB page size kernel.
On the other hand, some distributions(SUSE, RHEL) have a page size of 64KB,
and the THP size in that case is 512MB(not 2MB). I am afraid that 512MB of
huge page is somewhat difficult to use.
In hugetlbfs, page size variation increases by using contiguous bits
supported by aarch64 architecture, and 2MB, 512MB, 16GB, 4TB can be used
in 64KB environment(Actually, only 2MB is usable...). I also believe THP
is the best in the 4KB environment, but I am considering how to use the
huge page in the 64KB environment.
--
Tsukada Koutaro
Powered by blists - more mailing lists