On Sunday, 29 April 2007 10:23, Pavel Machek wrote:
Still, I think, if a kernel thread is a part of a device driver, then _in_
_principle_ it needs _some_ synchronization with the driver's suspend/freeze
and resume/thaw callbacks. For example, it's reasonable to assume that the
thread should be quiet between suspend/freeze and resume/thaw.
With the freezing of kernel threads we provide a simple means of such
synchronization: use try_to_freeze() in a suitable place of your kernel thread
and you're done. [Well, there should be a second part for making the thread
die if the thaw callback doesn't find the device, but that's in the works.]
Without it, there may be race conditions that we are not even aware of and that
may trigger in, say, 1 in 10 suspends or so and I wish you good luck with
debugging such things.
Greetings,
Rafael
-