Re: bogosort (was Re: Re: [RFC][PATCH -mm 5/6] Freezer: Use freezing timeout more efficiently)

Pavel Machek
2007-07-23T08:04:54Z

Hi!

> > > > Task here is to sort the tasks, and freeze them in such order that
> > > > freezing works, right? Yep, we do not know the dependencies
> > > > explicitely... but what you invented is bogosort.
> > >
> > > Define, please?
> >
> > Uff, sorry. http://en.wikipedia.org/wiki/Bogosort .
>
> So this thing is not bogosort, because it makes the tasks that haven't frozen
> appear on the bottom. IOW, the first (failing) freezing attempt is used as
> a sieve, so the process is not completely random.

Aha..

> > Hmm, if someone wants to retry... perhaps we should just return
> > specific error and let the _userland_ do the retries? It can do it as
> > efficiently as outer loop in freezer...
>
> No, because _that_ would be bogosort, as defined in Wikipedia. :-)

Ok, I see. It is better than bogosort... but still ugly. Can we at
least have someone tell us it helps with fuse before we proceed?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html