Re: [patch] sys_sync livelock fix

From: Andrew Morton (akpm@zip.com.au)
Date: Wed Feb 13 2002 - 20:29:08 EST


Daniel Phillips wrote:
>
> On February 14, 2002 01:53 am, Andrew Morton wrote:
> > Daniel Phillips wrote:
> > >
> > > What's the theory behind writing the data both before and after the commit?
> >
> > see fsync_dev(). It starts I/O against existing dirty data, then
> > does various fs-level syncy things which can produce more dirty
> > data - this is where ext3 runs its commit, via brilliant reverse
> > engineering of its calling context :-(.
>
> OK, so it sounds like cleaning that up with an ext3-specific super->sync would
> be cleaner for what it's worth, and save a little cpu.

Oh, having a filesystem sync entry point is much more than
a little cleanup. It's quite important. In current kernels
the same code path is used for both sync() and for periodic
kupdate writeback. It's not possible for the filesystem
to know which context it's being called in, and we do want
different behaviour.

We want the sys_sync() path to wait on writeout, but it's
silly to make the kupdate path do that.

> > It then again starts I/O against new dirty data then waits on it again. And
> > then again. There's quite a lot of overkill there. But that's OK, as long
> > as it terminates sometime.
>
> /me doesn't comment

That's odd.

-

:)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:59 EST