From owner-freebsd-hackers Wed Jun 23 13:29:52 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from acl.lanl.gov (acl.lanl.gov [128.165.147.1]) by hub.freebsd.org (Postfix) with ESMTP id 9148E14E06 for ; Wed, 23 Jun 1999 13:29:49 -0700 (PDT) (envelope-from rminnich@acl.lanl.gov) Received: from localhost (rminnich@localhost) by acl.lanl.gov (8.8.8/8.8.5) with ESMTP id OAA954795; Wed, 23 Jun 1999 14:29:46 -0600 (MDT) Date: Wed, 23 Jun 1999 14:29:46 -0600 From: "Ronald G. Minnich" To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Difference between msync() and fsync() In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG You should first check out how msync/fsync work on something like solaris, since every time I've checked for the last five years or so no version of bsd has really got it working right (although netbsd + UVM may finally have it). To observe msync/fsync in action use tcpdump to watch a host as it does msync/fsync on an nfs-mounted file system. You can tell by the NFS packets what's actually going on. Be sure to do msync on partial mapped ranges, not simple msync's of the whole region, as well as on dirty pages, clean pages, etc. Obviously for clean pages you should see no traffic when the msync is called, and you should see traffic when the page is referenced again. I've never had this latter test work on freebsd, and lots of other os'es. The only OS it ever really worked correctly on is sunos/solaris. You can search old archives for a long message from me (ca. 1995?) about how msync doesn't work right on freebsd. ron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message