Re: Freezer Patches.

Benjamin Herrenschmidt
2005-06-02T01:52:05Z

On Thu, 2005-06-02 at 11:46 +1000, Nigel Cunningham wrote:
> Hi.
>
> On Thu, 2005-06-02 at 10:35, Benjamin Herrenschmidt wrote:
> > > I agree that sync() is nice to have, but I'm not going to slow down
> > > fork/exit for it. And besides, sys_sync() just before suspend works
> > > just fine.
> >
> > Yes, that's why I put it in my pre-freeze :)
> >
> > I'll see about making my pre/post freeze stuff (APM emu + sync basically
> > now) generic to avoid the callbacks.
>
> Ummm. Don't do it if kthreads are already frozen. You'll deadlock against kjournald.

Which is why I do it pre-freeze.

With a 2 stage freezing though, it would make sense to first freeze
userland, then sync, then freeze kthreads. That would make the sync
faster (as it won't be "blocked" by pending userland IOs as I experience
regulary here) and more reliable.

Ben.