From: Jens Axboe <jens.axboe@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: writeback hang in current mainline
Date: Wed, 26 May 2010 13:49:50 +0200 [thread overview]
Message-ID: <20100526114950.GK23411@kernel.dk> (raw)
In-Reply-To: <20100526114018.GA30107@lst.de>
On Wed, May 26 2010, Christoph Hellwig wrote:
> On Wed, May 26, 2010 at 01:21:25PM +0200, Jens Axboe wrote:
> > Not good, can you see if reverting 7c8a3554 makes it go away?
>
> Reverting back to the revision before 7c8a3554 gives me lots of warnings ala:
>
> [ 178.253431] ------------[ cut here ]------------
> [ 178.256845] WARNING: at
> /home/hch/work/linux-2.6/fs/fs-writeback.c:596
> writeback_inodes_wb+0x423/0x440()
> [ 178.259995] Hardware name: Bochs
> [ 178.261270] Modules linked in:
> [ 178.262508] Pid: 2298, comm: flush-253:16 Tainted: G W
> 2.6.34-rc5 #121
> [ 178.265199] Call Trace:
> [ 178.266210] [<c08d86ca>] ? printk+0x18/0x1a
> [ 178.267597] [<c0162d0d>] warn_slowpath_common+0x6d/0xa0
> [ 178.269296] [<c0216ff3>] ? writeback_inodes_wb+0x423/0x440
> [ 178.271348] [<c0216ff3>] ? writeback_inodes_wb+0x423/0x440
> [ 178.273121] [<c0162d55>] warn_slowpath_null+0x15/0x20
> [ 178.274681] [<c0216ff3>] writeback_inodes_wb+0x423/0x440
> [ 178.276390] [<c0217111>] wb_writeback+0x101/0x1b0
> [ 178.277846] [<c01a9a79>] ? __call_rcu+0x99/0x130
> [ 178.279287] [<c01a9b38>] ? call_rcu+0x8/0x10
> [ 178.281110] [<c02161fa>] ? wb_clear_pending+0x7a/0xa0
> [ 178.282673] [<c021728f>] wb_do_writeback+0xcf/0x1a0
> [ 178.284239] [<c02171e0>] ? wb_do_writeback+0x20/0x1a0
> [ 178.285823] [<c021738a>] bdi_writeback_task+0x2a/0x90
> [ 178.287371] [<c01dca90>] ? bdi_start_fn+0x0/0xb0
> [ 178.288992] [<c01dcae8>] bdi_start_fn+0x58/0xb0
> [ 178.290823] [<c01dca90>] ? bdi_start_fn+0x0/0xb0
> [ 178.292378] [<c017dc7c>] kthread+0x6c/0x80
> [ 178.293711] [<c017dc10>] ? kthread+0x0/0x80
> [ 178.295073] [<c013023a>] kernel_thread_helper+0x6/0x1c
> [ 178.296753] ---[ end trace a7919e7f17c0a80f ]---
Oops yes, you need to revert the parent too. But nevermind, I think I
see the issue. Can you try the below (go back to -git again)?
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index ea8592b..5e6cc61 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -121,6 +121,7 @@ static void bdi_work_free(struct rcu_head *head)
static void wb_work_complete(struct bdi_work *work)
{
const enum writeback_sync_modes sync_mode = work->args.sync_mode;
+ const int caller_frees = work->args.sb_pinned;
int onstack = bdi_work_on_stack(work);
/*
@@ -131,7 +132,7 @@ static void wb_work_complete(struct bdi_work *work)
*/
if (!onstack)
bdi_work_clear(work);
- if (sync_mode == WB_SYNC_NONE || onstack)
+ if ((sync_mode == WB_SYNC_NONE && caller_frees) || onstack)
call_rcu(&work->rcu_head, bdi_work_free);
}
@@ -206,8 +207,10 @@ static void bdi_alloc_queue_work(struct backing_dev_info *bdi,
if (work) {
bdi_work_init(work, args);
bdi_queue_work(bdi, work);
- if (wait)
+ if (wait) {
bdi_wait_on_work_clear(work);
+ kfree(work);
+ }
} else {
struct bdi_writeback *wb = &bdi->wb;
--
Jens Axboe
WARNING: multiple messages have this Message-ID (diff)
From: Jens Axboe <jens.axboe@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: writeback hang in current mainline
Date: Wed, 26 May 2010 13:49:50 +0200 [thread overview]
Message-ID: <20100526114950.GK23411@kernel.dk> (raw)
In-Reply-To: <20100526114018.GA30107@lst.de>
On Wed, May 26 2010, Christoph Hellwig wrote:
> On Wed, May 26, 2010 at 01:21:25PM +0200, Jens Axboe wrote:
> > Not good, can you see if reverting 7c8a3554 makes it go away?
>
> Reverting back to the revision before 7c8a3554 gives me lots of warnings ala:
>
> [ 178.253431] ------------[ cut here ]------------
> [ 178.256845] WARNING: at
> /home/hch/work/linux-2.6/fs/fs-writeback.c:596
> writeback_inodes_wb+0x423/0x440()
> [ 178.259995] Hardware name: Bochs
> [ 178.261270] Modules linked in:
> [ 178.262508] Pid: 2298, comm: flush-253:16 Tainted: G W
> 2.6.34-rc5 #121
> [ 178.265199] Call Trace:
> [ 178.266210] [<c08d86ca>] ? printk+0x18/0x1a
> [ 178.267597] [<c0162d0d>] warn_slowpath_common+0x6d/0xa0
> [ 178.269296] [<c0216ff3>] ? writeback_inodes_wb+0x423/0x440
> [ 178.271348] [<c0216ff3>] ? writeback_inodes_wb+0x423/0x440
> [ 178.273121] [<c0162d55>] warn_slowpath_null+0x15/0x20
> [ 178.274681] [<c0216ff3>] writeback_inodes_wb+0x423/0x440
> [ 178.276390] [<c0217111>] wb_writeback+0x101/0x1b0
> [ 178.277846] [<c01a9a79>] ? __call_rcu+0x99/0x130
> [ 178.279287] [<c01a9b38>] ? call_rcu+0x8/0x10
> [ 178.281110] [<c02161fa>] ? wb_clear_pending+0x7a/0xa0
> [ 178.282673] [<c021728f>] wb_do_writeback+0xcf/0x1a0
> [ 178.284239] [<c02171e0>] ? wb_do_writeback+0x20/0x1a0
> [ 178.285823] [<c021738a>] bdi_writeback_task+0x2a/0x90
> [ 178.287371] [<c01dca90>] ? bdi_start_fn+0x0/0xb0
> [ 178.288992] [<c01dcae8>] bdi_start_fn+0x58/0xb0
> [ 178.290823] [<c01dca90>] ? bdi_start_fn+0x0/0xb0
> [ 178.292378] [<c017dc7c>] kthread+0x6c/0x80
> [ 178.293711] [<c017dc10>] ? kthread+0x0/0x80
> [ 178.295073] [<c013023a>] kernel_thread_helper+0x6/0x1c
> [ 178.296753] ---[ end trace a7919e7f17c0a80f ]---
Oops yes, you need to revert the parent too. But nevermind, I think I
see the issue. Can you try the below (go back to -git again)?
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index ea8592b..5e6cc61 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -121,6 +121,7 @@ static void bdi_work_free(struct rcu_head *head)
static void wb_work_complete(struct bdi_work *work)
{
const enum writeback_sync_modes sync_mode = work->args.sync_mode;
+ const int caller_frees = work->args.sb_pinned;
int onstack = bdi_work_on_stack(work);
/*
@@ -131,7 +132,7 @@ static void wb_work_complete(struct bdi_work *work)
*/
if (!onstack)
bdi_work_clear(work);
- if (sync_mode == WB_SYNC_NONE || onstack)
+ if ((sync_mode == WB_SYNC_NONE && caller_frees) || onstack)
call_rcu(&work->rcu_head, bdi_work_free);
}
@@ -206,8 +207,10 @@ static void bdi_alloc_queue_work(struct backing_dev_info *bdi,
if (work) {
bdi_work_init(work, args);
bdi_queue_work(bdi, work);
- if (wait)
+ if (wait) {
bdi_wait_on_work_clear(work);
+ kfree(work);
+ }
} else {
struct bdi_writeback *wb = &bdi->wb;
--
Jens Axboe
--
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>
next prev parent reply other threads:[~2010-05-26 11:49 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 11:13 writeback hang in current mainline Christoph Hellwig
2010-05-26 11:13 ` Christoph Hellwig
2010-05-26 11:21 ` Jens Axboe
2010-05-26 11:21 ` Jens Axboe
2010-05-26 11:40 ` Christoph Hellwig
2010-05-26 11:49 ` Jens Axboe [this message]
2010-05-26 11:49 ` Jens Axboe
2010-05-26 12:08 ` Christoph Hellwig
2010-05-26 12:08 ` Christoph Hellwig
2010-05-26 12:21 ` Jens Axboe
2010-05-26 12:21 ` Jens Axboe
2010-05-26 12:45 ` Christoph Hellwig
2010-05-26 12:56 ` Jens Axboe
2010-05-26 12:56 ` Jens Axboe
2010-05-26 13:42 ` Christoph Hellwig
2010-05-26 13:42 ` Christoph Hellwig
2010-05-26 13:44 ` Jens Axboe
2010-05-26 13:44 ` Jens Axboe
2010-05-26 13:45 ` Jens Axboe
2010-05-26 13:56 ` Christoph Hellwig
2010-05-26 17:18 ` Jens Axboe
2010-05-26 17:18 ` Jens Axboe
2010-05-26 17:43 ` Christoph Hellwig
2010-05-26 17:43 ` Christoph Hellwig
2010-05-26 17:47 ` Jens Axboe
2010-05-26 17:47 ` Jens Axboe
2010-05-26 19:18 ` Christoph Hellwig
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=20100526114950.GK23411@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@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.