From: Michal Hocko <mhocko@kernel.org>
To: ufo19890607@gmail.com
Cc: 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, yuzhoujian@didichuxing.com
Subject: Re: [PATCH v15 1/2] Reorganize the oom report in dump_header
Date: Wed, 31 Oct 2018 14:50:49 +0100 [thread overview]
Message-ID: <20181031135049.GO32673@dhcp22.suse.cz> (raw)
In-Reply-To: <1538226387-16600-1-git-send-email-ufo19890607@gmail.com>
On Sat 29-09-18 21:06:26, ufo19890607@gmail.com wrote:
[...]
> Changes since v14:
> - add the dump_oom_summary for the single line output of oom context.
> - fix the null pointer in the dump_header.
I do not remember details about this null ptr but the fix you seemed to
have done is
[...]
> +static void dump_oom_summary(struct oom_control *oc, struct task_struct *victim)
> +{
> + /* one line summary of the oom killer context. */
> + pr_info("oom-kill:constraint=%s,nodemask=%*pbl",
> + oom_constraint_text[oc->constraint],
> + nodemask_pr_args(oc->nodemask));
> + cpuset_print_current_mems_allowed();
> + pr_cont(",task=%s,pid=%d,uid=%d\n", victim->comm, victim->pid,
> + from_kuid(&init_user_ns, task_uid(victim)));
> +}
> +
> /*
> * Number of OOM victims in flight
> */
> @@ -951,6 +960,8 @@ static void oom_kill_process(struct oom_control *oc, const char *message)
>
> if (__ratelimit(&oom_rs))
> dump_header(oc, p);
> + if (oc)
> + dump_oom_summary(oc, victim);
>
this? If yes then this is bogus because oc is never NULL. Besides that,
you used to have this one line summary in dump_header which looks much
better fit to me than oom_kill_process.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2018-10-31 13:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-29 13:06 [PATCH v15 1/2] Reorganize the oom report in dump_header ufo19890607
2018-09-29 13:06 ` [PATCH v15 2/2] Add oom victim's memcg to the oom context information ufo19890607
2018-10-31 13:50 ` Michal Hocko [this message]
[not found] ` <CAHCio2jpqfdgrqOqyXQ=HUc-9kzDmtaYXH+9juVQS6hBHhSdPA@mail.gmail.com>
2018-11-01 10:30 ` [PATCH v15 1/2] Reorganize the oom report in dump_header Michal Hocko
[not found] ` <CAHCio2jZ-RRuJ02ARmio5YON4mn0jwtuK_purFRxqSuVD=JsPA@mail.gmail.com>
2018-11-02 8:34 ` Michal Hocko
2018-11-21 11:29 ufo19890607
2018-11-22 13:38 ` 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=20181031135049.GO32673@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=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).