Bug 70916

Summary: msync.2 manpage update
Product: Documentation Reporter: Radim Kolar <hsn>
Component: Books & ArticlesAssignee: Peter Pentchev <roam>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Radim Kolar 2004-08-24 21:40:22 UTC
Msync function is obsolete as noted in mmap manpage, but this information
is missing from msync manpage itself.

Fix: 

Add following text to msync.2 BUGS section
/copied from mmap manpage/

The msync(2) system call is obsolete since
BSD implements a coherent file system buffer cache.
However, it may be used to associate dirty VM pages
with file system buffers and thus cause them to be
flushed to physical media sooner rather than later.
Comment 1 Peter Pentchev 2004-08-25 09:44:15 UTC
On Tue, Aug 24, 2004 at 09:39:30PM +0200, Radim Kolar wrote:
> 
> >Number:         70916
> >Category:       docs
> >Synopsis:       msync.2 manpage update
> >Description:
> Msync function is obsolete as noted in mmap manpage, but this information
> is missing from msync manpage itself.

What do people think about the following patch?

G'luck,
Peter

Index: src/lib/libc/sys/msync.2
===================================================================
RCS file: /home/ncvs/src/lib/libc/sys/msync.2,v
retrieving revision 1.27
diff -u -r1.27 msync.2
--- src/lib/libc/sys/msync.2	30 Jun 2004 20:09:10 -0000	1.27
+++ src/lib/libc/sys/msync.2	25 Aug 2004 08:43:05 -0000
@@ -114,3 +114,12 @@
 .Fn msync
 system call first appeared in
 .Bx 4.4 .
+.Sh BUGS
+The
+.Fn msync
+system call is obsolete since
+.Bx
+implements a coherent file system buffer cache.
+However, it may be
+used to associate dirty VM pages with file system buffers and thus cause
+them to be flushed to physical media sooner rather than later.

-- 
Peter Pentchev	roam@ringlet.net    roam@cnsys.bg    roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
If this sentence didn't exist, somebody would have invented it.
Comment 2 Peter Pentchev 2004-08-25 09:56:07 UTC
On Wed, Aug 25, 2004 at 08:50:26AM +0000, Peter Pentchev wrote:
>  On Tue, Aug 24, 2004 at 09:39:30PM +0200, Radim Kolar wrote:
>  > 
>  > >Number:         70916
>  > >Category:       docs
>  > >Synopsis:       msync.2 manpage update
>  > >Description:
>  > Msync function is obsolete as noted in mmap manpage, but this information
>  > is missing from msync manpage itself.
>  
>  What do people think about the following patch?
[snip]
>  +However, it may be
>  +used to associate dirty VM pages with file system buffers and thus cause

Or rather, how about this one, which re-wraps the text...

G'luck,
Peter

Index: src/lib/libc/sys/msync.2
===================================================================
RCS file: /home/ncvs/src/lib/libc/sys/msync.2,v
retrieving revision 1.27
diff -u -r1.27 msync.2
--- src/lib/libc/sys/msync.2	30 Jun 2004 20:09:10 -0000	1.27
+++ src/lib/libc/sys/msync.2	25 Aug 2004 08:54:23 -0000
@@ -114,3 +114,12 @@
 .Fn msync
 system call first appeared in
 .Bx 4.4 .
+.Sh BUGS
+The
+.Fn msync
+system call is obsolete since
+.Bx
+implements a coherent file system buffer cache.
+However, it may be used to associate dirty VM pages with file system
+buffers and thus cause them to be flushed to physical media sooner
+rather than later.

-- 
Peter Pentchev	roam@ringlet.net    roam@cnsys.bg    roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
What would this sentence be like if pi were 3?
Comment 3 Xin LI freebsd_committer freebsd_triage 2005-02-14 16:33:56 UTC
Responsible Changed
From-To: freebsd-doc->roam

roam@ seems have a good patch for this but never committed it...
Comment 4 Craig Rodrigues freebsd_committer freebsd_triage 2005-09-17 19:07:04 UTC
State Changed
From-To: open->closed

Patch has been applied.