All of lore.kernel.org
 help / color / mirror / Atom feed
From: pintu@codeaurora.org
To: Michal Hocko <mhocko@suse.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	linux-mm@kvack.org, pintu.ping@gmail.com
Subject: Re: [PATCH] mm/util.c: Add error logs for commitment overflow
Date: Fri, 02 Oct 2020 21:53:37 +0530	[thread overview]
Message-ID: <adaf346febe6bb6fbdcedb8709e35bcb@codeaurora.org> (raw)
In-Reply-To: <20201002121726.GF4555@dhcp22.suse.cz>

On 2020-10-02 17:47, Michal Hocko wrote:

>> __vm_enough_memory: commitment overflow: ppid:150, pid:164, 
>> pages:62451
>> fork failed[count:0]: Cannot allocate memory
> 
> While I understand that fork failing due to overrcomit heuristic is non
> intuitive and I have seen people scratching heads due to this in the
> past I am not convinced this is a right approach to tackle the problem.

Dear Michal,
First, thank you so much for your review and comments.
I totally agree with you.

> First off, referencing pids is not really going to help much if process
> is short lived.

Yes, I agree with you.
But I think this is most important mainly for short lived processes 
itself.
Because, when this situation occurs, no one knows who could be the 
culprit.
However, user keeps dumping "ps" or "top" in background to reproduce 
once again.
At this time, we can easily match the pid, process-name (at least in 
most cases).

> Secondly, __vm_enough_memory is about any address space
> allocation. Why would you be interested in parent when doing mmap?
> 

Yes agree, we can remove ppid from here.
I thought it might be useful at least in case of fork (or short lived 
process).

> Last but not least _once is questionable as well. The first instance
> might happen early during the system lifetime and you will not learn
> about future failures so the overall point of debuggability is 
> seriously
> inhibited.
> 
> Maybe what you want is to report higher up the call chain (fork?) and
> have it ratelimited rather than _once? Or maybe just try to live with
> the confusing situation?
> 

Okay agree. I can change to pr_err_ratelimited.
In-fact, initially I thought to use ratelimited itself but then I 
thought
just once also should be fine at least.


Thanks,
Pintu

  reply	other threads:[~2020-10-02 16:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 11:57 [PATCH] mm/util.c: Add error logs for commitment overflow Pintu Kumar
2020-10-02 12:11 ` Matthew Wilcox
2020-10-02 16:18   ` pintu
2020-10-02 12:17 ` Michal Hocko
2020-10-02 16:23   ` pintu [this message]
2020-10-05  7:20     ` Michal Hocko
2020-10-19  3:02       ` pintu
2020-10-19 13:06         ` 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=adaf346febe6bb6fbdcedb8709e35bcb@codeaurora.org \
    --to=pintu@codeaurora.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=pintu.ping@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.