From: Peter Zijlstra <peterz@infradead.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH RESEND 2/2] f2fs: disable preemption when waiting on all pages writeback
Date: Thu, 28 Apr 2016 16:03:14 +0200 [thread overview]
Message-ID: <20160428140314.GD3448@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <0fda915e-2945-9c2b-0e5a-dff3b4e37a92@huawei.com>
On Thu, Apr 28, 2016 at 07:51:04PM +0800, Chao Yu wrote:
> > On Wed, Apr 27, 2016 at 09:41:48PM +0800, Chao Yu wrote:
> >> From: Chao Yu <yuchao0@huawei.com>
> >>
> >> The following condition can happen in a preemptible kernel, it may cause
> >> checkpointer hunging.
> >>
> >> CPU0: CPU1:
> >> - write_checkpoint
> >> - do_checkpoint
> >> - wait_on_all_pages_writeback
> >> - f2fs_write_end_io
> >> - wake_up
> >> this is last writebacked page, but
> >> no sleeper in sbi->cp_wait wait
> >> queue, wake_up is not been called.
> >> - prepare_to_wait(TASK_UNINTERRUPTIBLE)
> >> Here, current task can been preempted,
> >> but there will be no waker since last
> >> write_end_io has bypassed wake_up. So
> >> current task will sleep forever.
But here, you should be verifying if you really should go sleep; as the
code did; it tests for !get_pages(, F2FS_WRITEBACK), and if you've just
completed that very last one, this will break out.
> >> - io_schedule_timeout
> >
next prev parent reply other threads:[~2016-04-28 14:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 13:41 Chao Yu
2016-04-27 18:09 ` Jaegeuk Kim
2016-04-28 11:51 ` [f2fs-dev] " Chao Yu
2016-04-28 14:03 ` Peter Zijlstra [this message]
2016-04-28 14:30 ` Chao Yu
2016-04-28 14:37 ` Peter Zijlstra
2016-04-28 15:06 ` Chao Yu
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=20160428140314.GD3448@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.com \
/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