Subject: Re: uvm & flushing
To: Chuck Silvers <chuq@chuq.com>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: tech-kern
Date: 12/08/1999 11:32:52
On Tue, 7 Dec 1999, Chuck Silvers wrote:

> presumably, once you start the archiving process, you'd prevent the
> creation of new dirty pages so that your archive copy remains valid.
> if there are any dirty pages when you're about to mark the file
> non-resident, those pages would not be in the archived version,
> so flushing them to disk at this point wouldn't help much.
> (I'm making some guesses about how your system works, so if what
> I'm saying doesn't make any sense then I've no doubt guessed wrong.)

You've hit the important points, but our system's a little different.

We can't really prevent the creation of new dirty pages while archiving,
for two reasons. First off, I'm not sure how to make uvm do that. :-)

Second off (and more important), we are trying to preserve as much of the
normal user experience as possible. So if you see your file, and you want
to go edit it, you can. Even if we're in the process of archiving it.

We already have logic in the code so that a write to a file being archived
will make the archive fail (admittedly at the end of the archive, but
that's not bad). This step is easy as all the writes come through our
layer and we just update the bits after a successful write.

It's not so easy with uvm. Our layer wouldn't see writes until the page
daemon came along. :-) What should I do here? I am mainly interested in
knowing if our vnode has dirty pages before marking it archived. How can I
get this info?

Take care,

Bill