Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jan 1998 02:56:55 -0500 (EST)
From:      "John S. Dyson" <toor@dyson.iquest.net>
To:        julian@whistle.com (Julian Elischer)
Cc:        dyson@freebsd.org, cvs-committers@freebsd.org, cvs-all@freebsd.org, cvs-sys@freebsd.org
Subject:   Re: John's latest VM commit.
Message-ID:  <199801060756.CAA05511@dyson.iquest.net>
In-Reply-To: <Pine.BSF.3.95.980105233239.7998A-100000@current1.whistle.com> from Julian Elischer at "Jan 5, 98 11:37:05 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer said:
>
> Kirk told me a few years ago that he was seriously considering merging the
> vm-object and vnode strucures so that one BECAME the other. Is this a
> stupid idea? 
>
I don't think that it is a stupid idea.

> 
> In his estimation, they contained many of the same fiedls which simply
> meant duplication of information, an danother place where things could get
> out of sync.  Of course this was 5 years ago so you may already have
> removed much of the duplication.
> 
The vnode and VM object are actually two different things.  VM objects are
items of memory.  The vnode represents the filesystem's view of one type
of VM object.  Note that vnodes have lists of buffers associated with them,
and VM objects have pages associated with them.  Buffers are (should be)
there for I/O and temporary mappings (when needed.)  Pages associated with
objects are for caching.

Actually, I would like to see us do away with buffers, except as an
I/O abstraction.  The vnodes are specific to a type of secondary storage
object, but do not represent a memory object.

It would probably be a good thing to make all caching in our system VM object
based.  Then buffers will degrade into a structure used to communicate with
I/O devices.  I would not like to see the terrible mess that SVR4 has, with
various types of vnode like structures in order to represent swap, filesystem,
device files.

Eventually, as we can deprecate the use of buffer's as a metadata cache, I
think that our buffers will be able to be abstracted as I/O requests, as
they should be.  Then, the more general VM objects will be the primary (only)
caching mechanism.

-- 
John                  | Never try to teach a pig to sing,
dyson@freebsd.org     | it just makes you look stupid,
jdyson@nc.com         | and it irritates the pig.



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