linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] memcg, oom: lock mem_cgroup_print_oom_info
Date: Thu, 12 Dec 2013 15:31:51 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1312121528400.17641@chino.kir.corp.google.com> (raw)
In-Reply-To: <20131212084420.GA2630@dhcp22.suse.cz>

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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2013-12-12 23:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 15:42 Michal Hocko
2013-12-11 22:23 ` David Rientjes
2013-12-12  8:44   ` Michal Hocko
2013-12-12 23:31     ` David Rientjes [this message]

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=alpine.DEB.2.02.1312121528400.17641@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    /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