From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: Singlethread vs. freezable workqueues
Date: Mon, 21 May 2007 23:28:00 +0200 [thread overview]
Message-ID: <200705212328.00860.rjw@sisk.pl> (raw)
In-Reply-To: <20070521205409.GA167@tv-sign.ru>
On Monday, 21 May 2007 22:54, Oleg Nesterov wrote:
> On 05/21, Rafael J. Wysocki wrote:
> >
> > On Monday, 21 May 2007 21:33, Alan Stern wrote:
> > > Raphael:
> > >
> > > Are we now committed to making freezable workqueues always
> > > singlethreaded? Is it at all likely to change back? Or should I
> > > introduce a "create_singlethread_freezeable_workqueue" macro?
> >
> > This was done as a quick fix of an issue with one driver that started to use
> > (broken) freezable workqueues when we were not watching. ;-)
> >
> > We are going to have multithread freezable workqueues as well, but that'll
> > take some time. We've discussed this a bit with Oleg and I believe he has an
> > idea of how it can be done cleanly.
>
> No, I don't have an idea how to do this cleanly currently.
>
> We can fix them right now with Rafael's "take_over_work() + migrate_sequence"
> patch, feel free to send it. Not perfect, but should work.
Well, there's no hurry with that, I think. If there's a clear case in which
such a workqueue would be useful, we can do this. For now, I don't see one.
> Perhaps it makes sense to make some other changes first. For example, kill
> CPU_TASKS_FROZEN bit.
That's possible, but the microcode driver uses it in a nontrivial way and that
should be taken into consideration.
> Next. We can't make all wqs freezeable, but if we add freezer_exempt/PF_FE_XXX
> we can freeze them all for cpu_up/cpu_down, this also make things simpler.
Yes.
> Note that we don't have a good way to use take_over_work() for !freezeable wq.
> 2.6.21 does kthread_stop() first, this is deadlockable because we may have
> a work_struct on ->worklist which also calls kthread_stop(). Perhaps it makes
> sense to wait until kthread_stop() will be reworked (should be soon).
Yes, I think we should wait until the kthread-related things settle.
> Perhaps we can think a bit more :)
Sure, that won't hurt. :-)
Greetings,
Rafael
prev parent reply other threads:[~2007-05-21 21:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-21 19:33 Singlethread vs. freezable workqueues Alan Stern
2007-05-21 19:54 ` Rafael J. Wysocki
2007-05-21 20:23 ` Alan Stern
2007-05-21 21:20 ` Rafael J. Wysocki
2007-05-22 12:45 ` Oleg Nesterov
2007-05-22 15:03 ` Alan Stern
2007-05-22 16:26 ` Oleg Nesterov
2007-05-21 20:54 ` Oleg Nesterov
2007-05-21 21:28 ` Rafael J. Wysocki [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=200705212328.00860.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.linux-foundation.org \
--cc=oleg@tv-sign.ru \
/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