Subject: Re: *Very* strange interaction of /bin/cp and NFS reads
To: None <dyson@freefall.freebsd.org>
From: Mike Long <mike.long@analog.com>
List: netbsd-help
Date: 09/25/1995 10:30:58
>From: John Dyson <dyson@freefall.freebsd.org>
>Date: Thu, 21 Sep 1995 16:56:18 -0700 (PDT)

>If your analysis of the problem is correct (and I have no reason to
>suspect that you are wrong), it would probably be wise to "fix" cp
>to do read/writes.  That is the way the FreeBSD did it before the
>merged VM/Buffer cache code was done.  It looks like cp might be depending
>on semantics that just don't exist in NetBSD currently.

I looked at the sources for -current's cp over the weekend, and found
out that this had already been done.  Mea culpa.

>Note that if you mmap to read when you don't have a merged cache, it can
>double the amount of memory that the buffering takes for a given file
>(up until the system starts paging.)  (You have a copy of the file in
>the VM cache AND in the buffer cache.)

The VM copy exists only until cp terminates; then those pages should
be reclaimed with the rest of the process' pages.  Right?
-- 
Mike Long <mike.long@analog.com>           http://www.shore.net/~mikel
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA                assert(*this!=opinionof(Analog));