From: Tejun Heo <tj@kernel.org>
To: Jan Kara <jack@suse.cz>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Peter Chen <hzpeterchen@gmail.com>,
florian@mickler.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
usb-storage@lists.one-eyed-alien.net, Jan Kara <jack@suse.com>,
jkosina@suse.cz
Subject: Re: Freezable workqueue blocks non-freezable workqueue during the system resume process
Date: Wed, 16 Mar 2016 08:00:53 -0700 [thread overview]
Message-ID: <20160316150053.GG6980@mtj.duckdns.org> (raw)
In-Reply-To: <20160315092543.GD17942@quack.suse.cz>
Hello, Jan, Alan.
On Tue, Mar 15, 2016 at 10:25:43AM +0100, Jan Kara wrote:
> > The kernel does suspend device drivers; that is, it invokes their
> > suspend callbacks. But it doesn't "freeze" them in any sense. Once a
> > driver has been suspended, it assumes it won't receive any I/O requests
> > until it has been resumed. Therefore the kernel first has to prevent
> > all the upper layers from generating such requests and/or sending them
> > to the low-level drivers.
>
> OK, so Tejun and you should talk together because you both seem to want
> something else... If I understand it right, Tejun wants suspended devices
> to just queue requests that have been submitted after these devices were
> suspended and complete them once they are resumed...
Yeah, I suppose that's why we have the code base we do now. I don't
think freezing kernel threads is the right mechanism to plug IO
devices during suspend. It's way too error-prone and causes a
dependency nightmare as it acts essentially as a system-wide lock.
More complex drivers already plug themselves which are necessary no
matter what as upper layers or some kthreads aren't the only sources
of commands to devices. We can plug at block layer for IOs coming
down from higher layers. We can even provide a mechanism to plug
certain kthreads if necessary but they should be contained in the
driver - e.g. the suspend callback specifically blocking certain
specific kthreads - instead of the vague "the system is generally
stopped now and it seems to work most of the time" that we're doing
now.
Thanks.
--
tejun
prev parent reply other threads:[~2016-03-16 15:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 3:20 Peter Chen
2016-02-23 9:47 ` Peter Chen
2016-02-23 15:34 ` Alan Stern
2016-02-24 7:24 ` Peter Chen
2016-02-25 22:01 ` Tejun Heo
2016-02-26 6:19 ` Peter Chen
2016-03-02 16:00 ` Tejun Heo
2016-03-03 9:33 ` Jan Kara
2016-03-11 17:56 ` Tejun Heo
2016-03-14 7:22 ` Jan Kara
2016-03-14 14:37 ` Alan Stern
2016-03-15 9:25 ` Jan Kara
2016-03-16 15:00 ` Tejun Heo [this message]
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=20160316150053.GG6980@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=florian@mickler.org \
--cc=hzpeterchen@gmail.com \
--cc=jack@suse.com \
--cc=jack@suse.cz \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=usb-storage@lists.one-eyed-alien.net \
/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