All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Jan Kara <jack@suse.cz>, Peter Chen <hzpeterchen@gmail.com>,
	florian@mickler.org, jkosina@suse.cz,
	Linux-pm mailing list <linux-pm@vger.kernel.org>
Subject: Re: Should suspend plug low-level devices?
Date: Fri, 18 Mar 2016 16:32:42 -0400	[thread overview]
Message-ID: <20160318203242.GL20028@mtj.duckdns.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1603171433300.2097-100000@iolanthe.rowland.org>

Hello,

On Thu, Mar 17, 2016 at 02:51:36PM -0400, Alan Stern wrote:
> > Stopping kthreads in itself is fine but the problem is that we
> > currently don't know who's stopping what.  Just making each freezing
> > explicit, say, an explicit invocation of kthread_freeze_kthread(),
> > wouldn't be that difficult and would go a long way.  e.g. It would
> > immediately solve the problem arising from kthread freezing order not
> > matching device dependency hierarchy.
> 
> We're talking about workqueues in particular.  Freezing order is not 
> the issue.

Whether something is running on kthread or workqueue doesn't make any
difference.  Why would it?  It's about dependency chain, not what
something is running on.

> > * Make block layer plug bio's from upper layers.
> > 
> > * Visit each freezable workqueue or kthread users and convert them to
> >   plug explicitly.
> 
> How would this help the case in question?  If a workqueue is plugged 
> instead of frozen, won't flush_delayed_work still deadlock?

By plugging and unplugging in a well defined order rather than
"whatever comes first in workqueue or task lists".

> kthreads (including workqueues) get frozen at controlled places.  
> Presumably they are smart enough not to allow themselves to be frozen
> while any I/Os are in flight.

I don't think that's the main problem here.

Thanks.

-- 
tejun

  reply	other threads:[~2016-03-18 20:32 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23  3:20 Freezable workqueue blocks non-freezable workqueue during the system resume process 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
2016-03-16 15:37                       ` Should suspend plug low-level devices? Alan Stern
2016-03-16 16:31                         ` Rafael J. Wysocki
2016-03-16 16:35                           ` Tejun Heo
2016-03-16 16:39                             ` Rafael J. Wysocki
2016-03-16 23:18                               ` Jiri Kosina
2016-03-16 23:24                                 ` Rafael J. Wysocki
2016-03-16 23:42                                   ` Jiri Kosina
2016-03-16 23:48                                     ` Rafael J. Wysocki
2016-03-17  7:50                                     ` Oliver Neukum
2016-03-17  8:02                                       ` Jiri Kosina
2016-03-17  8:20                                         ` Oliver Neukum
2016-03-17  8:35                                           ` Jiri Kosina
2016-03-17  9:12                                             ` Oliver Neukum
2016-03-17 10:20                                               ` Jiri Kosina
2016-03-17 10:29                                                 ` Oliver Neukum
2016-03-17 10:36                                                   ` Jiri Kosina
2016-03-17 18:55                                     ` Alan Stern
2016-03-18 20:29                                       ` Tejun Heo
2016-03-17  0:05                                   ` Tejun Heo
2016-03-17 18:58                                     ` Alan Stern
2016-03-18 20:25                                       ` Tejun Heo
2016-03-17 18:53                                   ` Alan Stern
2016-03-18 20:29                                     ` Tejun Heo
2016-03-16 16:34                         ` Tejun Heo
2016-03-17 18:51                           ` Alan Stern
2016-03-18 20:32                             ` Tejun Heo [this message]
2016-03-18 21:06                               ` Alan Stern
2016-03-20 18:29                                 ` Tejun Heo
2016-03-21 14:38                                   ` Alan Stern
2016-03-30 17:09                                     ` 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=20160318203242.GL20028@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=florian@mickler.org \
    --cc=hzpeterchen@gmail.com \
    --cc=jack@suse.cz \
    --cc=jkosina@suse.cz \
    --cc=linux-pm@vger.kernel.org \
    --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.