From: Tejun Heo <tj@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Jens Axboe <axboe@kernel.dk>, "Rafael J. Wysocki" <rjw@sisk.pl>,
Linux-pm mailing list <linux-pm@vger.kernel.org>,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: Bug in disk event polling
Date: Fri, 10 Feb 2012 12:46:52 -0800 [thread overview]
Message-ID: <20120210204652.GJ19392@google.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1202101519020.1281-100000@iolanthe.rowland.org>
(cc'ing Rafael)
Hello, Alan.
On Fri, Feb 10, 2012 at 03:31:20PM -0500, Alan Stern wrote:
> Don't ask me why this hasn't shown up earlier... There's a big fat bug
> in the implementation of disk event polling.
>
> The polling is done using the system_nrt_wq work queue, which isn't
> freezable. As a result, polling continues while the system is
> preparing for suspend or hibernation.
>
> Obviously I/O to suspended devices doesn't work well. Somewhat less
> obviously, error recovery for the failed I/O attempts can interfere
> with normal system resume.
Hmmm.... I see. Yeah, that can be a problem.
> You can see this for yourself easily enough by suspending or
> hibernating while a USB flash drive is plugged in. You don't even need
> to go through the full suspend procedure; the first two stages are
> enough (echo devices >/sys/power/pm_test). Check the system log
> afterward; most likely you'll find the flash drive got errors and had
> to be unregistered and re-enumerated.
Do you happen to have log of such failure? Polilng failure itself
shouldn't lead to such failure mode.
> I have verified that changing all occurrences of system_nrt_wq in
> block/genhd.c to system_freezable_wq fixes the bug. However this may
> not be the way you want to solve it; you may prefer to have a freezable
> non-reentrant work queue.
Please feel free to send out a patch to fix the issue. :)
Thanks.
--
tejun
next prev parent reply other threads:[~2012-02-10 20:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-10 20:31 Bug in disk event polling Alan Stern
2012-02-10 20:46 ` Tejun Heo [this message]
2012-02-10 21:03 ` Alan Stern
2012-02-10 21:12 ` Tejun Heo
2012-02-10 21:44 ` Alan Stern
2012-02-11 0:23 ` Tejun Heo
2012-02-12 17:48 ` Alan Stern
2012-02-12 21:26 ` Rafael J. Wysocki
2012-02-12 22:02 ` Alan Stern
2012-02-13 17:30 ` Tejun Heo
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=20120210204652.GJ19392@google.com \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=stern@rowland.harvard.edu \
/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.