From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
kamezawa.hiroyu@jp.fujitsu.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [BUGFIX][PATCH] memcg: fix deadlock between lock_page_cgroupand mapping tree_lock
Date: Thu, 14 May 2009 07:18:01 +0530 [thread overview]
Message-ID: <20090514014801.GS13394@balbir.in.ibm.com> (raw)
In-Reply-To: <20090513115626.57844f28.akpm@linux-foundation.org>
* Andrew Morton <akpm@linux-foundation.org> [2009-05-13 11:56:26]:
> On Wed, 13 May 2009 13:30:31 +0900
> Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
>
> > mapping->tree_lock can be aquired from interrupt context.
> > Then, following dead lock can occur.
> >
> > Assume "A" as a page.
> >
> > CPU0:
> > lock_page_cgroup(A)
> > interrupted
> > -> take mapping->tree_lock.
> > CPU1:
> > take mapping->tree_lock
> > -> lock_page_cgroup(A)
>
> And we didn't find out about this because lock_page_cgroup() uses
> bit_spin_lock(), and lockdep doesn't handle bit_spin_lock().
>
> It would perhaps be useful if one of you guys were to add a spinlock to
> struct page, convert lock_page_cgroup() to use that spinlock then run a
> full set of tests under lockdep, see if it can shake out any other bugs.
>
May be under DEBUG_VM we could do that. Good suggestion!
--
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>
prev parent reply other threads:[~2009-05-14 2:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-13 4:30 [BUGFIX][PATCH] memcg: fix deadlock between lock_page_cgroup and mapping tree_lock Daisuke Nishimura
2009-05-13 18:56 ` Andrew Morton
2009-05-13 23:44 ` KAMEZAWA Hiroyuki
2009-05-14 1:48 ` Balbir Singh [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=20090514014801.GS13394@balbir.in.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.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;
as well as URLs for NNTP newsgroup(s).