[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 12 Dec 2013 15:31:51 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Michal Hocko <mhocko@...e.cz>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
linux-mm@...ck.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] memcg, oom: lock mem_cgroup_print_oom_info
On Thu, 12 Dec 2013, Michal Hocko wrote:
> > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > index 28c9221b74ea..c72b03bf9679 100644
> > > --- a/mm/memcontrol.c
> > > +++ b/mm/memcontrol.c
> > > @@ -1647,13 +1647,13 @@ static void move_unlock_mem_cgroup(struct mem_cgroup *memcg,
> > > */
> > > void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
> > > {
> > > - struct cgroup *task_cgrp;
> > > - struct cgroup *mem_cgrp;
> > > /*
> > > - * Need a buffer in BSS, can't rely on allocations. The code relies
> > > - * on the assumption that OOM is serialized for memory controller.
> > > - * If this assumption is broken, revisit this code.
> > > + * protects memcg_name and makes sure that parallel ooms do not
> > > + * interleave
> >
> > Parallel memcg oom kills can happen in disjoint memcg hierarchies, this
> > just prevents the printing of the statistics from interleaving. I'm not
> > sure if that's clear from this comment.
>
> What about this instead:
> * Protects memcg_name and makes sure that ooms from parallel
> * hierarchies do not interleave.
> ?
I think it would be better to explicitly say that you're referring only to
the printing here and that we're ensuring it does not interleave in the
kernel log.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists