bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Review of Thomas's >2GB ext2fs proposal


From: Neal H. Walfield
Subject: Re: Review of Thomas's >2GB ext2fs proposal
Date: Tue, 17 Aug 2004 04:58:40 -0400
User-agent: Wanderlust/2.8.1 (Something) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryōmae) APEL/10.6 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)

At 17 Aug 2004 01:48:05 -0700,
Thomas Bushnell BSG wrote:
> 
> "Neal H. Walfield" <neal@cs.uml.edu> writes:
> 
> > If you didn't have this eviction strategy in mind for draining the
> > mapping cache, I am curious what you were going to do.  It seems to me
> > that anything else would be in far greater contention with the
> > kernel's eviction strategy.  This is my analysis from the I sent on
> > the 16th entitled "Review of Thomas's >2GB ext2fs proposal:"
> 
> Nothing is necessary.  You simply de-map, with vm_unmap.  Doing so
> does not cause the page to be paged out by the kernel, and has
> nothing whatsoever to do with the kernel's pageout strategy.  Unlike
> paging, vm_map and vm_unmap are purely local operations where no
> global optimization is relevant, so there is no reason to prefer
> kernel control over them.

De-mapping is not an eviction strategy.  How do you choose which
mappings to get rid of once the cache is filled?  If the operations
are really of trivial cost, then we needn't cache the mappings; we
just vm_map and vm_unmap the pages each time they are requested and
thereby eliminate any reference counting system.

> So I would simply advocate a straightforward LRU of such things, with
> a reference count for the number of users of a mapping.  

What is the time stamp you will use?  I don't need to save any extra
data in my proposal.  This is extra memory you are using.

> The reference count, incidentally, you still need for your version,
> don't you?

Sure.  But a reference is held for a relatively short time (most
mappings will have a reference count of zero).  Hence, if a page has
no references it does not mean it will not be used in the near future.
Consider how a sequential read works: client asks for a page, meta
data is consulted (hence a reference is gotten), block list is
obtained (reference is dropped), data is gotten and returned to user
which process the data; repeat.  For most of the time, the reference
on the page is zero.

> If you drop mappings whenever the kernel evicts a page, what do you do
> for pageouts of currently active pages?  How do you distinguish this
> from a pageout of an idle page?

Why is the kernel dropping the page if it is active in the first
place?  This logic seems suspect.  The interesting corner case is what
happens if there are user references and the kernel drops the page.
Well, in this case, we just leave the mapping in place based on the
assumption that the page will be faulted back in momentarily
(otherwise, why would there by a reference?).

Neal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]