Re: freeze_processes questions

Rafael J. Wysocki
2005-04-05T22:46:17Z

[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]

Hi,

On Tuesday, 5 of April 2005 22:37, Pavel Machek wrote:
]--snip--[
> > 2) We can try to force uninterruptible tasks to get their "signals" anyway using
> > wake_up_state() directly on them (which I don't like as much).
>
> They are probably uninterruptible for a reason...
>
> If something is staying in UNINTERRUPTIBLE for more than 1 second, it
> is going to cause problems elsewhere, anyway. Do you see that happening?

Probably. Please see, for example, this message sent to l-k:

http://marc.theaimsgroup.com/?l=linux-kernel&m=111268969510393&w=2

I can easily trigger a similar behavior with an uninterruptible task and I
have some problems with freezing tasks on SMP that smell like this too.

If we are going to ignore uninterruptible tasks, I'd propose to set PF_FREEZE
and TIF_SIGPENDING for them without counting them as "todo" in
freeze_processes() (if such a task is woken up afterwards by an interrupt
handler, it'll get the "signal" and it'll go to the refrigerator() immediately,
because of the PF_FREEZE). At least, I'd do this on resume, as we don't care
for these tasks then anyway and IMHO it's not a good idea to fail because of
them.

I think we should also clear PF_FREEZE for uninterruptible tasks in
thaw_processes(), just in case. :-)

Greets,
Rafael

--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"