From: Jan Kara <jack@suse.cz>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Jan Kara <jack@suse.cz>, LKML <linux-kernel@vger.kernel.org>,
Wu Fengguang <fengguang.wu@intel.com>
Subject: Re: [PATCH] fs: Fix busyloop in wb_writeback()
Date: Thu, 17 Sep 2009 11:09:14 +0200 [thread overview]
Message-ID: <20090917090914.GA16381@duck.suse.cz> (raw)
In-Reply-To: <20090916184106.GT23126@kernel.dk>
On Wed 16-09-09 20:41:06, Jens Axboe wrote:
> On Wed, Sep 16 2009, Jan Kara wrote:
> > If all inodes are under writeback (e.g. in case when there's only one inode
> > with dirty pages), wb_writeback() with WB_SYNC_NONE work basically degrades
> > to busylooping until I_SYNC flags of the inode is cleared. Fix the problem by
> > waiting on I_SYNC flags of an inode on b_more_io list in case we failed to
> > write anything.
>
> Interesting, so this will happen if the dirtier and flush thread end up
> "fighting" each other over the same inode. I'll throw this into the
> testing mix.
Yes, exactly. When you do "dd if=/dev/zero of=/mnt/mydisk" you're quite
likely to observe that.
> How did you notice?
Well, UML linux doesn't seem to preempt when a process when it is in the
kernel and thus such busyloop simply deadlocks it. BTW another similar
deadlock happens in UML linux in balance_dirty_pages() (process cycles
there waiting for nr_writeback to drop but that never seems to happen). But
I'd blame that to a problem in UML scheduling...
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2009-09-17 9:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-16 17:22 Jan Kara
2009-09-16 18:41 ` Jens Axboe
2009-09-17 9:09 ` Jan Kara [this message]
2009-09-21 13:01 ` Wu Fengguang
2009-09-21 13:06 ` Jens Axboe
2009-09-21 13:10 ` Wu Fengguang
2009-09-21 13:40 ` Jens Axboe
2009-09-21 13:19 ` Jan Kara
2009-09-21 13:28 ` Wu Fengguang
2009-09-19 1:53 ` Wu Fengguang
2009-09-20 2:35 ` Wu Fengguang
2009-09-20 17:43 ` Jan Kara
2009-09-21 1:08 ` Wu Fengguang
2009-09-21 13:45 ` Jan Kara
2009-09-21 14:11 ` Wu Fengguang
2009-09-21 14:19 ` Chris Mason
2009-09-21 14:31 ` Wu Fengguang
2009-09-21 14:45 ` Chris Mason
2009-09-22 9:14 ` Wu Fengguang
2009-09-23 7:56 ` Wu Fengguang
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=20090917090914.GA16381@duck.suse.cz \
--to=jack@suse.cz \
--cc=fengguang.wu@intel.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome