Re: [RFC][PATCH -mm 3/3] Freezer: Replace the timeout

Rafael J. Wysocki
2007-08-05T22:38:01Z

On Sunday, 5 August 2007 23:37, Pavel Machek wrote:
> Hi!
>
> > > What happens on loaded ext3 filesystem, for example? Bunch of userland tasks
> > > will wait on data to be synced to disk, taking more than second, no?
> >
> > IMHO this only is a question of what the value of MAX_WAITS should be.
> > [I took 5 because it turned to be enough in my testing, but that could be 10 or
> > more.]
> >
> > The point is that in 99.(9)% of cases the 20s timeout is unnecessary, because:
> > (1) most often we succeed within 1s
> > (2) if we are going to fail, we can say that we'll fail way before the 20s
> > expires.
>
> Well, I've just reproduced 10seconds and 17seconds
> time-to-freeze. Okay, I did
>
> make clean; time make -j 350
>
> on kernel (2GB machine). Can you try with something similary evil?

I tested with 'make -j 100'. More than that just makes the machine
unresponsive.

> > Anyway, eventually, I'd like the freezer to detect failures relatively early,
> > so the user won't have to wait 20s each time it's going to fail.
>
> It should not fail ;-). And failures are _really_ rare these days. Is
> 20second wait in case of kernel bug that bad? (FUSE case _is_ a kernel
> bug, I'm just not sure how to solve it. It is still rare.)

Well, not very bad, but still. Perhaps we should use a progress meter of
some kind to let the user know that something's going on. ;-)

Greetings,
Rafael

--
"Premature optimization is the root of all evil." - Donald Knuth