Re: Hibernation Redesign

From: Nigel Cunningham
Date: Wed Jul 11 2007 - 08:17:16 EST


Hi.

On Wednesday 11 July 2007 22:09:39 Miklos Szeredi wrote:
> > > Freezing of tasks is slowing down suspend. Don't know how serious
> > > this is, suspend is pretty fast, but could possibly be even faster.
> >
> > It's FUD. Freezing of tasks normally takes next to no time. I've never
> > understood the rediculously long timeout it has. If freezing succeeds, all
> > processes are frozen within 1/2 a second tops. If it fails, nothing is
going
> > to change in the following 19.5 seconds (or whatever it is if I don't
> > remember the value properly).
>
> Right. The 20s timeout is again a sign of brokenness.
>
> If we expect something to fail, it should fail immediately, without
> waiting for arbitrary timeouts.
>
> And if we don't expect it to fail, why the timeout?

Two reasons:

1) The processing does take time. We're sending (pseudo-)signals to other
processes, and the amount of time it will take for them to enter the
refrigerator will depend upon the number of processes there are, the
scheduling algorithm being used, the rate at which they're forking and what
other activity is occuring. That's why I said "normally" above.

2) Things do get broken. New functionality gets added which sometimes doesn't
immediately play well with the freezer. In such cases, we want to fail nicely
rather than wrongly assuming it will always work and waiting indefinitely.

Regards,

Nigel
--
See http://www.tuxonice.net for Howtos, FAQs, mailing
lists, wiki and bugzilla info.

Attachment: pgp00000.pgp
Description: PGP signature