From owner-freebsd-emulation Wed Dec 22 13:48: 8 1999 Delivered-To: freebsd-emulation@freebsd.org Received: from gvr.gvr.org (gvr.gvr.org [194.151.74.97]) by hub.freebsd.org (Postfix) with ESMTP id AF32114C2C; Wed, 22 Dec 1999 13:48:05 -0800 (PST) (envelope-from guido@gvr.org) Received: by gvr.gvr.org (Postfix, from userid 657) id 03949A84F; Wed, 22 Dec 1999 22:48:03 +0100 (CET) Date: Wed, 22 Dec 1999 22:48:03 +0100 From: Guido van Rooij To: Peter Wemm Cc: Hidetoshi Shimokawa , vsilyaev@mindspring.com, dillon@freebsd.org, freebsd-emulation@FreeBSD.ORG, dbutter@wireless.net Subject: Re: VMware: Questions... Message-ID: <19991222224803.A410@gvr.gvr.org> References: <19991220153149.AD13C1CCE@overcee.netplex.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: <19991220153149.AD13C1CCE@overcee.netplex.com.au>; from Peter Wemm on Mon, Dec 20, 1999 at 11:31:49PM +0800 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, Dec 20, 1999 at 11:31:49PM +0800, Peter Wemm wrote: > > > > This is because mmaped file is written every 30 second by sync daemon. > > The file is usually named /var/tmp/ram0 but it's unlinked right after > > opened so you cannot see it by 'ls' although it exits. > > It would be nice if the VFS/VM system detected this automatically and > switched on NOSYNC for files that got unlinked... I wouldn't be suprised if > this is what Linux does. Matt, is this possible? > I havent seen an answer to this question yet. If it is possible, that would be very nice. I doubt it though, but my knowledge on that part of the system is rather limited. A quick workaround could be to look at the ref count of the underlying inode of the fd passed to the linux mmap If the refcount is one then clearly the inode is no being referenced through a directory entry in the file system. This could even be done for the general mmap call (provided a regular file of course). But it might be a very specific situation because one usually would not used a file backed mmap in FreeBSD, yet use an anonymous mmap. -Guido To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message