From owner-freebsd-emulation Thu Dec 23 19: 5:49 1999 Delivered-To: freebsd-emulation@freebsd.org Received: from smtp7.atl.mindspring.net (smtp7.atl.mindspring.net [207.69.128.51]) by hub.freebsd.org (Postfix) with ESMTP id C603714D79; Thu, 23 Dec 1999 19:05:46 -0800 (PST) (envelope-from vsilyaev@mindspring.com) Received: from mindspring.com (user-2iniik1.dialup.mindspring.com [165.121.74.129]) by smtp7.atl.mindspring.net (8.9.3/8.8.5) with ESMTP id WAA00396; Thu, 23 Dec 1999 22:05:24 -0500 (EST) Received: (from vsilyaev@localhost) by mindspring.com (8.9.3/8.9.3) id WAA18373; Thu, 23 Dec 1999 22:05:15 -0500 (EST) (envelope-from vsilyaev) Date: Thu, 23 Dec 1999 22:05:14 -0500 From: "Vladimir N. Silyaev" To: Guido van Rooij Cc: Peter Wemm , Hidetoshi Shimokawa , vsilyaev@mindspring.com, dillon@freebsd.org, freebsd-emulation@freebsd.org, dbutter@wireless.net Subject: Re: VMware: Questions... Message-ID: <19991223220514.A1504@jupiter.delta.ny.us> References: <19991220153149.AD13C1CCE@overcee.netplex.com.au> <19991222224803.A410@gvr.gvr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <19991222224803.A410@gvr.gvr.org>; from guido@gvr.org on Wed, Dec 22, 1999 at 10:48:03PM +0100 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, Dec 22, 1999 at 10:48:03PM +0100, Guido van Rooij wrote: > 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. My personal suggestion about this, that in the Linux emulator we can safety use the original Hidetoshi patch, because I assume that Linux never do syncing a mmaped files. I'm not discover the linux code about that, and don't do any experiment. Of course, this don't cancel the proposition about NO_ASYNC and unreferenced files. -- Vladimir Silyaev To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message