Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2001 23:03:07 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        dillon@freebsd.org, freebsd-emulation@freebsd.org
Subject:   Re: What's changed recently with vmware/linuxemu/file I/O
Message-ID:  <14980.48507.507487.690557@grasshopper.cs.duke.edu>
In-Reply-To: <Pine.BSF.4.21.0102101303001.20995-100000@besplex.bde.org>
References:  <14980.8856.555504.633075@grasshopper.cs.duke.edu> <Pine.BSF.4.21.0102101303001.20995-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14980.48507.507487.690557>