linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: 禹舟键 <ufo19890607@gmail.com>,
	akpm@linux-foundation.org, rientjes@google.com,
	kirill.shutemov@linux.intel.com, aarcange@redhat.com,
	penguin-kernel@i-love.sakura.ne.jp, guro@fb.com,
	yang.s@alibaba-inc.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	"Wind Yu" <yuzhoujian@didichuxing.com>
Subject: Re: [PATCH v7 2/2] Refactor part of the oom report in dump_header
Date: Mon, 11 Jun 2018 09:07:20 +0200	[thread overview]
Message-ID: <20180611070720.GA13364@dhcp22.suse.cz> (raw)
In-Reply-To: <20180610051215.GA20681@rapoport-lnx>

On Sun 10-06-18 08:12:16, Mike Rapoport wrote:
> On Fri, Jun 08, 2018 at 05:53:14PM +0800, 禹舟键 wrote:
> > Hi Mike
> > > My question was why do you call to alloc_constrained in the dump_header()
> > > function rather than pass the constraint that was detected a bit earlier to
> > > that function?
> > 
> > dump_header will be called by three functions: oom_kill_process,
> > check_panic_on_oom, out_of_memory.
> > We can get the constraint from the last two
> > functions(check_panic_on_oom, out_of_memory), but I need to
> > pass a new parameter(constraint) for oom_kill_process.
> 
> Another option is to add the constraint to the oom_control structure.

Which would make more sense because oom_control should contain the full
OOM context.
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-06-11  7:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-02 11:58 [PATCH v7 1/2] Add an array of const char and enum oom_constraint in memcontrol.h ufo19890607
2018-06-02 11:58 ` [PATCH v7 2/2] Refactor part of the oom report in dump_header ufo19890607
2018-06-03 12:49   ` Mike Rapoport
2018-06-04  1:58     ` 禹舟键
2018-06-04  2:41       ` 禹舟键
2018-06-04  4:58         ` Mike Rapoport
2018-06-04  6:25           ` 禹舟键
2018-06-08  9:53           ` 禹舟键
2018-06-10  5:12             ` Mike Rapoport
2018-06-11  7:07               ` Michal Hocko [this message]
2018-06-03 14:45   ` Tetsuo Handa
2018-06-04  6:52   ` Michal Hocko
2018-06-04  8:18     ` 禹舟键
2018-06-04  8:57       ` 禹舟键
2018-06-04  9:52         ` Michal Hocko
2018-06-04 12:13           ` 禹舟键
2018-06-04 12:17             ` Michal Hocko
2018-06-02 11:58 ` [PATCH v7 1/2] Add an array of const char and enum oom_constraint in memcontrol.h ufo19890607
2018-06-02 11:58 ` [PATCH v7 2/2] Refactor part of the oom report in dump_header ufo19890607
2018-06-04  6:48 ` [PATCH v7 1/2] Add an array of const char and enum oom_constraint in memcontrol.h 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=20180611070720.GA13364@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=guro@fb.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=rientjes@google.com \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=ufo19890607@gmail.com \
    --cc=yang.s@alibaba-inc.com \
    --cc=yuzhoujian@didichuxing.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;
as well as URLs for NNTP newsgroup(s).