From: David Rientjes <rientjes@google.com>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH] mm/memcontrol: update documentation about invoking oom killer
Date: Sat, 2 Nov 2019 16:55:37 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.21.1911021654020.34229@chino.kir.corp.google.com> (raw)
In-Reply-To: <157270779336.1961.6528158720593572480.stgit@buzz>
On Sat, 2 Nov 2019, Konstantin Khlebnikov wrote:
> Since commit 29ef680ae7c2 ("memcg, oom: move out_of_memory back to the
> charge path") memcg invokes oom killer not only for user page-faults.
> This means 0-order allocation will either succeed or task get killed.
>
> Fixes: 8e675f7af507 ("mm/oom_kill: count global and memory cgroup oom kills")
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> ---
> Documentation/admin-guide/cgroup-v2.rst | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
> index 5361ebec3361..eb47815e137b 100644
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -1219,8 +1219,13 @@ PAGE_SIZE multiple when read back.
>
> Failed allocation in its turn could be returned into
> userspace as -ENOMEM or silently ignored in cases like
> - disk readahead. For now OOM in memory cgroup kills
> - tasks iff shortage has happened inside page fault.
> + disk readahead.
> +
> + Before 4.19 OOM in memory cgroup killed tasks iff
> + shortage has happened inside page fault, random
> + syscall may fail with ENOMEM or EFAULT. Since 4.19
> + failed memory cgroup allocation invokes oom killer and
> + keeps retrying until it succeeds.
>
> This event is not raised if the OOM killer is not
> considered as an option, e.g. for failed high-order
The previous text is obviously incorrect for today's kernels, but I'm
curious if we should be conflating the documentation here by describing
the pre-4.19 behavior. OOM killing no longer happens only on page fault
so maybe better to document the exact behavior today and not attempt to
describe differences with previous versions?
next prev parent reply other threads:[~2019-11-02 23:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-02 15:16 Konstantin Khlebnikov
2019-11-02 16:02 ` Damian Tometzki
2019-11-02 16:14 ` Konstantin Khlebnikov
2019-11-02 16:28 ` Damian Tometzki
2019-11-02 23:55 ` David Rientjes [this message]
2019-11-03 10:46 ` Konstantin Khlebnikov
2019-11-05 6:09 ` Michal Hocko
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=alpine.DEB.2.21.1911021654020.34229@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.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