From: Michal Hocko <mhocko@kernel.org>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mike Kravetz <mike.kravetz@oracle.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Vlastimil Babka <vbabka@suse.cz>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch] mm, hugetlb_cgroup: suppress SIGBUS when hugetlb_cgroup charge fails
Date: Mon, 28 May 2018 11:03:29 +0200 [thread overview]
Message-ID: <20180528090329.GF1517@dhcp22.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.21.1805251505110.50062@chino.kir.corp.google.com>
On Fri 25-05-18 15:18:11, David Rientjes wrote:
[...]
> Let's see what Mike and Aneesh say, because they may object to using
> VM_FAULT_OOM because there's no way to guarantee that we'll come under the
> limit of hugetlb_cgroup as a result of the oom. My assumption is that we
> use VM_FAULT_SIGBUS since oom killing will not guarantee that the
> allocation can succeed.
Yes. And the lack of hugetlb awareness in the oom killer is another
reason. There is absolutely no reason to kill a task when somebody
misconfigured the hugetlb pool.
> But now a process can get a SIGBUS if its hugetlb
> pages are not allocatable or its under a limit imposed by hugetlb_cgroup
> that it's not aware of. Faulting hugetlb pages is certainly risky
> business these days...
It's always been and I am afraid it will always be unless somebody
simply reimplements the current code to be NUMA aware for example (it is
just too easy to drain a per NODE reserves...).
> Perhaps the optimal solution for reaching hugetlb_cgroup limits is to
> induce an oom kill from within the hugetlb_cgroup itself? Otherwise the
> unlucky process to fault their hugetlb pages last gets SIGBUS.
Hmm, so you expect that the killed task would simply return pages to the
pool? Wouldn't that require to have a hugetlb cgroup OOM killer that
would only care about hugetlb reservations of tasks? Is that worth all
the effort and the additional code?
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2018-05-28 15:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 20:16 [patch] mm, hugetlb_cgroup: suppress SIGBUS when hugetlb_cgroup charge fails David Rientjes
2018-05-25 20:44 ` Andrew Morton
2018-05-25 20:59 ` David Rientjes
2018-05-25 21:09 ` Andrew Morton
2018-05-25 22:18 ` David Rientjes
2018-05-28 9:03 ` Michal Hocko [this message]
2018-05-28 8:52 ` Michal Hocko
2018-05-29 18:13 ` Mike Kravetz
2018-05-30 20:51 ` David Rientjes
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=20180528090329.GF1517@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).