From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 29 07:36:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9011D16A4CE for ; Mon, 29 Mar 2004 07:36:58 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B79543D2F for ; Mon, 29 Mar 2004 07:36:58 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i2TFaufj065566; Mon, 29 Mar 2004 09:36:56 -0600 (CST) (envelope-from dan) Date: Mon, 29 Mar 2004 09:36:56 -0600 From: Dan Nelson To: Peter Jeremy Message-ID: <20040329153656.GA14775@dan.emsphone.com> References: <20040327195505.13415.qmail@web21113.mail.yahoo.com> <20040328210236.GM3446@dan.emsphone.com> <20040329080003.GA72136@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040329080003.GA72136@server.vk2pj.dyndns.org> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org cc: Mark Terribile Subject: Re: MS_ASYNC with MS_INVALIDATE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2004 15:36:58 -0000 In the last episode (Mar 29), Peter Jeremy said: > On Sun, Mar 28, 2004 at 03:02:37PM -0600, Dan Nelson wrote: > >In the last episode (Mar 27), Mark Terribile said: > > > A friend asked me to run some Linux source on FreeBSD. It > > > simulates a data pool management system he is using, and it > > > includes a call msync(2) with both the MS_ASYNC and MS_INVALIDATE > > > flags. FreeBSD does not allow this. (I tested it on my 4.8 > > > system; I'll have access to a 5.1 system on Monday.) I ran it > > > without the MS_ASYNC, and got very different results from the > > > ones he reported on Linux. I'd like to be able to explain what's > > > happening. > > My interpretation of the man page suggests that MS_ASYNC should not > have any effect other than timing unless there are race conditions. Me too. No combination of flags to msync() should affect any other processes view of the data IMHO. It just affects how soon the blocks get written to disk. Now, if you're also accessing this file over NFS, that's a different matter. I actually think MS_INVALIDATE might be a no-op on a system with a merged vm/buffer cache. -- Dan Nelson dnelson@allantgroup.com