* When to use a freezeable workqueue?
@ 2007-08-12 8:11 Stefan Richter
2007-08-12 22:18 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Richter @ 2007-08-12 8:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Rafael J. Wysocki
In which situations is create_freezeable_workqueue() to be preferred
over create_singlethread_workqueue()?
Is a freezable worqueue preferable whenever the worker thread /can/ be
frozen, or is it only to be used if the thread /must/ be frozen during
suspend?
Thanks,
--
Stefan Richter
-=====-=-=== =--- -==--
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: When to use a freezeable workqueue?
2007-08-12 8:11 When to use a freezeable workqueue? Stefan Richter
@ 2007-08-12 22:18 ` Rafael J. Wysocki
2007-08-13 2:29 ` [linux-pm] " Alan Stern
0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2007-08-12 22:18 UTC (permalink / raw)
To: Stefan Richter; +Cc: linux-kernel, Pavel Machek, pm list
On Sunday, 12 August 2007 10:11, Stefan Richter wrote:
> In which situations is create_freezeable_workqueue() to be preferred
> over create_singlethread_workqueue()?
>
> Is a freezable worqueue preferable whenever the worker thread /can/ be
> frozen, or is it only to be used if the thread /must/ be frozen during
> suspend?
The latter, IMO.
Generally, if you want it to be frozen.
Greetings,
Rafael
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-pm] Re: When to use a freezeable workqueue?
2007-08-12 22:18 ` Rafael J. Wysocki
@ 2007-08-13 2:29 ` Alan Stern
0 siblings, 0 replies; 3+ messages in thread
From: Alan Stern @ 2007-08-13 2:29 UTC (permalink / raw)
To: Stefan Richter; +Cc: pm list, Kernel development list, Pavel Machek
On Mon, 13 Aug 2007, Rafael J. Wysocki wrote:
> On Sunday, 12 August 2007 10:11, Stefan Richter wrote:
> > In which situations is create_freezeable_workqueue() to be preferred
> > over create_singlethread_workqueue()?
> >
> > Is a freezable worqueue preferable whenever the worker thread /can/ be
> > frozen, or is it only to be used if the thread /must/ be frozen during
> > suspend?
>
> The latter, IMO.
>
> Generally, if you want it to be frozen.
A good example of a reason for making a workqueue freezable is that the
workqueue contains entries which would cause a suspended device to be
resumed. Obviously you don't want such things to happen while the
system is going to sleep. A little less obviously, there might also be
problems if such a routine ran while the system was waking up.
Another reason might be that the workqueue contains entries which would
try to register or unregister a device. Such actions aren't a good
idea at times when the PM core is iterating through a list of all
devices in order to suspend or resume them. And in the future such
actions may block, effectively freezing the workqueue anyway -- which
could be troublesome if you don't want the workqueue to be frozen!
Alan Stern
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-13 2:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-12 8:11 When to use a freezeable workqueue? Stefan Richter
2007-08-12 22:18 ` Rafael J. Wysocki
2007-08-13 2:29 ` [linux-pm] " Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®