linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: menage@google.com,
	KAMEZAWA Hiroyuki <kamezawa.hiroyuki@jp.fujitsu.com>,
	Daisuke Miyakawa <dmiyakawa@google.com>,
	YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC][RFT] memcg fix cgroup_mutex deadlock when cpuset reclaims memory
Date: Wed, 10 Dec 2008 13:16:11 +0530	[thread overview]
Message-ID: <20081210074611.GA25467@balbir.in.ibm.com> (raw)
In-Reply-To: <20081210151948.9a83f70a.nishimura@mxp.nes.nec.co.jp>

* Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> [2008-12-10 15:19:48]:

> On Wed, 10 Dec 2008 10:49:47 +0530, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> > Hi,
> > 
> > Here is a proposed fix for the memory controller cgroup_mutex deadlock
> > reported. It is lightly tested and reviewed. I need help with review
> > and test. Is the reported deadlock reproducible after this patch? A
> > careful review of the cpuset impact will also be highly appreciated.
> > 
> > From: Balbir Singh <balbir@linux.vnet.ibm.com>
> > 
> > cpuset_migrate_mm() holds cgroup_mutex throughout the duration of
> > do_migrate_pages(). The issue with that is that
> > 
> > 1. It can lead to deadlock with memcg, as do_migrate_pages()
> >    enters reclaim
> > 2. It can lead to long latencies, preventing users from creating/
> >    destroying other cgroups anywhere else
> > 
> > The patch holds callback_mutex through the duration of cpuset_migrate_mm() and
> > gives up cgroup_mutex while doing so.
> > 
> I agree changing cpuset_migrate_mm not to hold cgroup_mutex to fix the dead lock
> is one choice, and it looks good to me at the first impression.
> 
> But I'm not sure it's good to change cpuset(other subsystem) code because of memcg.
> 
> Anyway, I'll test this patch and report the result tomorrow.
> (Sorry, I don't have enough time today.)

Thanks for helping Daisuke-San!

I'll look forward to your test result. I'll continue to pound my
system meanwhile

-- 
	Balbir

--
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>

  parent reply	other threads:[~2008-12-10  7:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10  5:19 Balbir Singh
2008-12-10  6:19 ` Daisuke Nishimura
2008-12-10  7:41   ` Daisuke Nishimura
2008-12-10  8:11     ` Balbir Singh
2008-12-10  8:18     ` KAMEZAWA Hiroyuki
2008-12-10 11:53       ` Daisuke Nishimura
2008-12-10 13:06         ` Balbir Singh
2008-12-10 14:08           ` Daisuke Nishimura
2008-12-10 14:29             ` Balbir Singh
2008-12-10  7:46   ` Balbir Singh [this message]
2008-12-10  8:49 ` KAMEZAWA Hiroyuki
2008-12-10 10:50   ` Balbir Singh
2008-12-10 11:32     ` [RFC][RFT] memcg fix cgroup_mutex deadlock when cpusetreclaims memory KAMEZAWA Hiroyuki
2008-12-10 13:24       ` Balbir Singh

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=20081210074611.GA25467@balbir.in.ibm.com \
    --to=balbir@linux.vnet.ibm.com \
    --cc=dmiyakawa@google.com \
    --cc=kamezawa.hiroyuki@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=menage@google.com \
    --cc=nishimura@mxp.nes.nec.co.jp \
    --cc=yamamoto@valinux.co.jp \
    /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