Re: [PATCH] fs: fix for core dumping of a process getting oom-killed
From: Michal Hocko
Date: Wed Sep 22 2021 - 04:09:42 EST
On Tue 21-09-21 20:12:08, Vishnu Rangayyan wrote:
>
>
> On 9/21/21 5:59 AM, Michal Hocko wrote:
[...]
> > Why
> > is fsync helping at all? Why do we need a new sysctl to address the
> > problem and how does it help to prevent the memcg OOM. Also why is this
> > a problem in the first place.
> The simple intent is to allow the core dumping to succeed in low memory
> situations where the dump_emit doesn't tip over the thing and trigger the
> oom-killer. This change avoids only that particular issue.
How does it avoid that?
> Agree, its not the actual problem at all. If the core dumping fails, that
> sometimes prevents or delays looking into the actual issue.
> The sysctl was to allow disabling this behavior or to fine tune for special
> cases such as limited memory environments.
Please note that any sysctl is an userspace API that has to be
maintained effectivelly for ever so there should be a very good reason
and a strong justification to add one. I do not see that to be case
here.
--
Michal Hocko
SUSE Labs