PATCH: Forcible delaying of UFS (soft)updates

Terry Lambert tlambert2 at mindspring.com
Fri Apr 18 14:21:34 PDT 2003


Marko Zec wrote:
> On Friday 18 April 2003 09:13, David Schultz wrote:
> > Your code bumps rushjob up by the arbitrary value 32, which is
> > rather large.  Doing so is going to throw things out of whack.
> 
> Which things and how?
> 
> > What you would probably want to do is leave rushjob alone.  If it
> > ever becomes nonzero, the syncer should wake up and start writing
> > again.
> 
> Sure, that's precisely why I increment rushjob - to instruct the syncer to
> start synching when I want it to. What's wrong with that?

Touching rushjob is probably not a good idea.

The main technical (not philosophical) problem with the patch
as it sits is that you can cause the soft updates wheel to wrap
around.

Then when you write things out, they write out of order.

The purpose of the wheel is to allow placing of operations at
some relative offset in the future to an outstanding operation,
to ensure ordering.


No matter what else you do, you can not allow the wheel to
"wrap".  Because the offsets are "future relative", that means
that you have to flush at some number of wheel entries equal
to:

	wrap_boundary - the_largest_potential_future_offset - 1.

Making the wheel bigger is probably acceptable, but then you
will exacerbate the memory problem that rushjob was invented
to resolve (please do a "cvs log" and look at the checkin
comments; I still believe it was "dillon" who made the change).

-- Terry


More information about the freebsd-fs mailing list