From: Wu Fengguang <fengguang.wu@intel.com>
To: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Jan Kara <jack@suse.cz>, Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: deadlock balance_dirty_pages() to be expected?
Date: Fri, 7 Oct 2011 21:37:34 +0800 [thread overview]
Message-ID: <20111007133733.GA6399@localhost> (raw)
In-Reply-To: <4E8EF1D9.8050700@itwm.fraunhofer.de>
Hi Bernd,
On Fri, Oct 07, 2011 at 08:34:33PM +0800, Bernd Schubert wrote:
> Hello,
>
> while I'm working on the page cached mode in FhGFS (*) I noticed a
> deadlock in balance_dirty_pages().
>
> sysrq-w showed that it never started background write-out due to
>
> if (bdi_nr_reclaimable > bdi_thresh) {
> pages_written += writeback_inodes_wb(&bdi->wb,
> (write_chunk);
>
>
> and therefore also did not leave that loop with
>
> if (pages_written >= write_chunk)
> break; /* We've done our duty */
>
>
> So my process stay in uninterruptible D-state forever.
If writeback_inodes_wb() is not triggered, the process should still be
able to proceed, presumably with longer delays, but never stuck forever.
That's because the flusher thread should still be cleaning the pages
in the background which will knock down the dirty pages and eventually
unthrottle the dirtier process.
> Once I added basic inode->i_data.backing_dev_info bdi support to our
> file system, the deadlock did not happen anymore.
What's the workload and change exactly?
> So my question is simply if we should expect this deadlock, if the file
> system does not set up backing device information and if so, shouldn't
> this be documented?
Such deadlock is not expected..
Thanks,
Fengguang
next prev parent reply other threads:[~2011-10-07 13:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-07 12:34 deadlock balance_dirty_pages() to be expected? Bernd Schubert
2011-10-07 13:37 ` Wu Fengguang [this message]
2011-10-07 14:08 ` Bernd Schubert
2011-10-07 14:21 ` Wu Fengguang
2011-10-07 14:30 ` Bernd Schubert
2011-10-07 14:38 ` Wu Fengguang
2011-10-11 14:55 ` Bernd Schubert
2011-10-12 1:45 ` 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=20111007133733.GA6399@localhost \
--to=fengguang.wu@intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=bernd.schubert@itwm.fraunhofer.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@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