From: Wu Fengguang <fengguang.wu@intel.com>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@lst.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] mmotm: fix hang at startup
Date: Sun, 1 May 2011 11:25:07 +0800 [thread overview]
Message-ID: <20110501032507.GA21118@localhost> (raw)
In-Reply-To: <alpine.LSU.2.00.1104301929520.1343@sister.anvils>
On Sun, May 01, 2011 at 10:35:38AM +0800, Hugh Dickins wrote:
> Yesterday's mmotm hangs at startup, and with lockdep it reports:
> BUG: spinlock recursion on CPU#1, blkid/284 - with bdi_lock_two()
> called from bdev_inode_switch_bdi() in the backtrace. It appears
> that this function is sometimes called with new the same as old.
>
> Signed-off-by: Hugh Dickins <hughd@google.com>
Thanks!
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
> Fix to
> writeback-split-inode_wb_list_lock-into-bdi_writebacklist_lock.patch
>
> fs/block_dev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- 2.6.39-rc5-mm1/fs/block_dev.c 2011-04-29 18:20:09.183314733 -0700
> +++ linux/fs/block_dev.c 2011-04-30 17:55:45.718785263 -0700
> @@ -57,6 +57,8 @@ static void bdev_inode_switch_bdi(struct
> {
> struct backing_dev_info *old = inode->i_data.backing_dev_info;
>
> + if (dst == old)
> + return;
nitpick: it could help to add a comment
/* avoid spinlock recursion */
to indicate that's not merely an optional optimization, but indeed
required for correctness.
Thanks,
Fengguang
> bdi_lock_two(&old->wb, &dst->wb);
> spin_lock(&inode->i_lock);
> inode->i_data.backing_dev_info = dst;
WARNING: multiple messages have this Message-ID (diff)
From: Wu Fengguang <fengguang.wu@intel.com>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@lst.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] mmotm: fix hang at startup
Date: Sun, 1 May 2011 11:25:07 +0800 [thread overview]
Message-ID: <20110501032507.GA21118@localhost> (raw)
In-Reply-To: <alpine.LSU.2.00.1104301929520.1343@sister.anvils>
On Sun, May 01, 2011 at 10:35:38AM +0800, Hugh Dickins wrote:
> Yesterday's mmotm hangs at startup, and with lockdep it reports:
> BUG: spinlock recursion on CPU#1, blkid/284 - with bdi_lock_two()
> called from bdev_inode_switch_bdi() in the backtrace. It appears
> that this function is sometimes called with new the same as old.
>
> Signed-off-by: Hugh Dickins <hughd@google.com>
Thanks!
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
> Fix to
> writeback-split-inode_wb_list_lock-into-bdi_writebacklist_lock.patch
>
> fs/block_dev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- 2.6.39-rc5-mm1/fs/block_dev.c 2011-04-29 18:20:09.183314733 -0700
> +++ linux/fs/block_dev.c 2011-04-30 17:55:45.718785263 -0700
> @@ -57,6 +57,8 @@ static void bdev_inode_switch_bdi(struct
> {
> struct backing_dev_info *old = inode->i_data.backing_dev_info;
>
> + if (dst == old)
> + return;
nitpick: it could help to add a comment
/* avoid spinlock recursion */
to indicate that's not merely an optional optimization, but indeed
required for correctness.
Thanks,
Fengguang
> bdi_lock_two(&old->wb, &dst->wb);
> spin_lock(&inode->i_lock);
> inode->i_data.backing_dev_info = dst;
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-05-01 3:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 23:26 mmotm 2011-04-29-16-25 uploaded akpm
2011-04-29 23:26 ` akpm
2011-04-30 16:46 ` Randy Dunlap
2011-04-30 16:46 ` Randy Dunlap
2011-05-01 7:47 ` KOSAKI Motohiro
2011-05-01 7:47 ` KOSAKI Motohiro
2011-05-02 15:46 ` Randy Dunlap
2011-05-02 15:46 ` Randy Dunlap
2011-05-01 2:35 ` [PATCH] mmotm: fix hang at startup Hugh Dickins
2011-05-01 2:35 ` Hugh Dickins
2011-05-01 3:25 ` Wu Fengguang [this message]
2011-05-01 3:25 ` Wu Fengguang
2011-05-02 0:26 ` mmotm 2011-04-29 - wonky VmRSS and VmHWM values after swapping Valdis.Kletnieks
2011-05-02 14:37 ` Valdis.Kletnieks
2011-05-02 23:44 ` Andrew Morton
2011-05-02 23:44 ` Andrew Morton
2011-05-02 23:57 ` Valdis.Kletnieks
2011-05-10 16:04 ` Peter Zijlstra
2011-05-10 16:04 ` Peter Zijlstra
2011-05-11 22:53 ` Andrew Morton
2011-05-11 22:53 ` Andrew Morton
2011-05-12 1:08 ` Valdis.Kletnieks
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=20110501032507.GA21118@localhost \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=hughd@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.