lkml.org 
[lkml]   [2018]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v15 1/2] Reorganize the oom report in dump_header
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

\
 
 \ /
  Last update: 2018-10-31 14:51    [W:0.061 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site