Subject: Re: lfs
To: Thor Lancelot Simon <>
From: Konrad Schroder <>
List: tech-kern
Date: 02/27/2003 10:46:05
On Thu, 27 Feb 2003, Thor Lancelot Simon wrote:

> I don't understand this.  How can we have demand for 20% of the segments
> in the filesystem, even if there is simultaneous cleaning and user I/O
> going on?  How can we require 20% "slop" in order to avoid deadlock?  The
> Sprite code, IIRC, reserved two segments, and noted that reserving one
> should theoretically be sufficient.

In theory, yes, one reserved segment should be sufficient.  We have some
problems that I don't know if Sprite had (apparently not).

If we get really short on available space, the cleaner has to run through
the entire filesystem moving the files all around.  This in itself is not
a problem, but it means that ~every file will be moved, which means that
the cleaner will at some point load each of their vnodes.  If there are
many files, this means that we will run out of vnodes at some point and
have to flush all the writes that are blocked awaiting the cleaner anyway.
Voila, no clean segments.  This is not an insoluble problem, just a little

Empirically, it seems like this cleaner thrash starts to happen at around
80-85% of filesystem capacity, though I'm sure it depends on the
circumstances;  that's where that 20% figure came from.

						Konrad Schroder