Subject: bin/13502: cp(1) should use mmap(2) instead of read(2)
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Scheler <tron@colwyn.zhadum.de>
List: netbsd-bugs
Date: 07/18/2001 18:35:26
>Number:         13502
>Category:       bin
>Synopsis:       cp(1) should use mmap(2) instead of read(2)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 18 09:33:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.5L
>Organization:
Matthias Scheler                                  http://scheler.de/~matthias/
>Environment:
Doesn't matter.

>Description:
The sources of our cp(1) contain a code path which uses mmap(2) instead of
read(2) for reading data from a source file. This approach should result
in a performance gain now that UBC has been integrated. However because
mmap(2) is broken on LFS and maybe NTFS this code path shouldn't be
activated yet. This PR is intended to make sure that it is forgotten once
the filesystem mentioned above got fixed.

>How-To-Repeat:
Look at the source code "src/bin/cp/utils.c".

>Fix:
Add "CPPFLAGS+= -DVM_AND_BUFFER_CACHE_SYNCHRONIZED" to "src/bin/cp/Makefile".

>Release-Note:
>Audit-Trail:
>Unformatted: