Re: Re: freeze_processes questions

Pavel Machek
2005-04-08T06:23:06Z

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

On Čt 07-04-05 23:03:15, Rafael J. Wysocki wrote:
> Hi,
>
> On Thursday, 7 of April 2005 22:00, Alan Stern wrote:
> > On Thu, 7 Apr 2005, Rafael J. Wysocki wrote:
> ]--snip--[
> > > > If that means waiting more than 10 seconds or so, you should just give up.
> > > > Return an error and put a message in the log saying something like "Can't
> > > > suspend because process XXX is busy".
> > >
> > > OK, that's what we do now. Except that IMO we should clear the PF_FREEZE flag
> > > for this process and do recalc_sigpending() for it after we give up, because
> > > otherwise it will enter the refrigerator sooner or later and it will stay there.
> > > Alternatively, we can disable the "freezing loop" in refrigerator() as soon as
> > > thaw_processes() is started. Also, we can avoid setting PF_FREEZE for
> > > processes in TASK_UNINTERRUPTIBLE, but count them as "freezable". Etc.
> >
> > Yes, all the necessary cleanup steps should be taken.
>
> Pavel, which approach do you like most?

Clearing PF_FREEZE when we fail to stop some process sounds okay to
me. It would be nice if the patch was actually tested ;-).

I do not think you can deal with TASK_UNINTERRUPTIBLE in some
reasonable way... If you do something with them be sure to make it
separate patch :-).
Pavel
--
Boycott Kodak -- for their patent abuse against Java.