From: TSUKADA Koutaro <tsukada@ascade.co.jp>
To: Mike Kravetz <mike.kravetz@oracle.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Naoya Horiguchi" <n-horiguchi@ah.jp.nec.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Punit Agrawal" <punit.agrawal@arm.com>,
"Dan Williams" <dan.j.williams@intel.com>,
"Vlastimil Babka" <vbabka@suse.cz>,
"Andrea Arcangeli" <aarcange@redhat.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
cgroups@vger.kernel.org, tsukada@ascade.co.jp
Subject: Re: [PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg
Date: Tue, 8 May 2018 09:35:41 +0900 [thread overview]
Message-ID: <7c4dced0-fb54-4336-8bcb-e863187a0d49@ascade.co.jp> (raw)
In-Reply-To: <fae2dde5-00b0-f12c-66ff-8b69351805a9@oracle.com>
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
prev parent reply other threads:[~2018-05-08 0:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-02 1:19 TSUKADA Koutaro
2018-05-02 4:41 ` Mike Kravetz
2018-05-02 6:54 ` TSUKADA Koutaro
2018-05-03 2:33 ` Mike Kravetz
2018-05-04 0:09 ` TSUKADA Koutaro
2018-05-04 4:26 ` Mike Kravetz
2018-05-08 0:35 ` TSUKADA Koutaro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7c4dced0-fb54-4336-8bcb-e863187a0d49@ascade.co.jp \
--to=tsukada@ascade.co.jp \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=cgroups@vger.kernel.org \
--cc=dan.j.williams@intel.com \
--cc=hannes@cmpxchg.org \
--cc=khandual@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=marcandre.lureau@redhat.com \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=punit.agrawal@arm.com \
--cc=vbabka@suse.cz \
--cc=vdavydov.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox