Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Apr 2003 14:20:07 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Marko Zec <zec@tel.fer.hr>
Cc:        freebsd-stable@FreeBSD.org
Subject:   Re: PATCH: Forcible delaying of UFS (soft)updates
Message-ID:  <3EA06C07.A34F1C31@mindspring.com>
References:  <3E976EBD.C3E66EF8@tel.fer.hr> <3E9E93D8.EB16ED42@tel.fer.hr> <200304182243.05739.zec@tel.fer.hr>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EA06C07.A34F1C31>