Subject: Re: Unified Buffer Cache 1st snapshot
To: None <tech-kern@netbsd.org>
From: Thor Lancelot Simon <tls@panix.com>
List: tech-kern
Date: 09/21/1998 20:27:33
On Mon, Sep 21, 1998 at 11:25:33AM +0200, Stefan Grefen wrote:
> In message <4917.906350832@chuq.com> Chuck Silvers wrote:
> > hi folks,
> >
>
> [...]
>
> > the interfaces for the kernel to access the page cache are ubc_alloc()
> > and ubc_release() (ala segmap_getmap() and segmap_release()).
> > you get a mapping onto the part of the file the user wants to change,
> > do a uiomove() to copy the user's buffer in, and then release the mapping.
> > mappings are cached in an LRU fashion.
>
> Why copy and not map, mapping eliminates a copy and conserves memory ???
Mapping is only a win _sometimes_, on _some processors_. Not all MMUs are
"fast"; many I/O's are "too small".
Heck, why not just have uiomove() map instead of copy? Clearly it's not
always appropriate.
Thor