From owner-freebsd-emulation Fri Feb 9 20: 3:58 2001 Delivered-To: freebsd-emulation@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 2F9BB37B401; Fri, 9 Feb 2001 20:03:40 -0800 (PST) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id XAA22019; Fri, 9 Feb 2001 23:03:39 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.1/8.9.1) id f1A437F42478; Fri, 9 Feb 2001 23:03:07 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14980.48507.507487.690557@grasshopper.cs.duke.edu> Date: Fri, 9 Feb 2001 23:03:07 -0500 (EST) To: Bruce Evans Cc: dillon@freebsd.org, freebsd-emulation@freebsd.org Subject: Re: What's changed recently with vmware/linuxemu/file I/O In-Reply-To: References: <14980.8856.555504.633075@grasshopper.cs.duke.edu> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Bruce Evans writes: > On Fri, 9 Feb 2001, Andrew Gallatin wrote: > > > Julian Elischer writes: > > > > > > I don't like the sound of that hack.. > > > are they doing something in Linux to tell Linux to not sync it? > > > > Linux apparently only syncs mmap'ed files when they are closed (or > > when it is under memory pressure). Eg, linux treats every mmap'ed file > > as MAP_NOSYNC. > > This may be just because the default mount option under linux is > equivalent to -async under FreeBSD. Mmapped files shouldn't be synced > differently than ordinary files unless an mmap option specifies it. No, Linux really treats them differently. It will at least start sinking ordinary files to disk nearly instantly, but it just plain won't touch mmaped files until the file is closed (or until it comes under memory pressure). I've empirically verified this behaviour with a 2.2.16-22 kernel on a collegue's machine and with ahunt.c (in ~gallatin/ on freefall). I do have one question -- for the app we care about (vmware) the pages in the mmaped file will apparently be wired. Is there any reason why we couldn't just skip wired pages in vm_object_page_clean()? It seems like there's no point in cleaning a wired page because you won't be able to free it anyway, so it doesn't matter if it is dirty... Thanks, Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message