From owner-freebsd-emulation@FreeBSD.ORG Fri Jan 7 07:20:13 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9350F106566C for ; Fri, 7 Jan 2011 07:20:13 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.freebsd.org (Postfix) with ESMTP id 277C48FC08 for ; Fri, 7 Jan 2011 07:20:12 +0000 (UTC) Received: from mail2.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id p077KBZB016677; Fri, 7 Jan 2011 08:20:12 +0100 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail2.siemens.de (8.13.6/8.13.6) with ESMTP id p077KBfx003933; Fri, 7 Jan 2011 08:20:11 +0100 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id p077KBQd001630; Date: Fri, 7 Jan 2011 08:20:11 +0100 From: Andre Albsmeier To: Alexander Leidinger Message-ID: <20110107072011.GA3905@curry.mchp.siemens.de> References: <20101230075124.GA12923@curry.mchp.siemens.de> <20101231144800.00005c6d@unknown> <20110101224629.GA30540@curry.mchp.siemens.de> <20110102115021.00000c8b@unknown> <20110105191915.GA43997@curry.mchp.siemens.de> <20110106090130.20784sf1w9verdic@webmail.leidinger.net> <20110106104057.GB59969@curry.mchp.siemens.de> <20110106132857.11513i1k24thhwug@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110106132857.11513i1k24thhwug@webmail.leidinger.net> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "freebsd-emulation@freebsd.org" Subject: Re: 7.3-STABLE and Linux version of SIMetrix X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2011 07:20:13 -0000 On Thu, 06-Jan-2011 at 13:28:57 +0100, Alexander Leidinger wrote: > Quoting Andre Albsmeier (from Thu, 6 Jan > 2011 11:40:57 +0100): > > > On Thu, 06-Jan-2011 at 09:01:30 +0100, Alexander Leidinger wrote: > >> Quoting Andre Albsmeier (from Wed, 5 Jan > >> 2011 20:19:15 +0100): > >> > >> > Got it running... A short explanation: > >> > > >> > Linux' shm_open() fails because it wants to find some funky shmfs > >> > to construct the full pathname. It starts to search at the default > >> > mountpoint which is /dev/shm. If this fails it runs through fstab > >> > and searches for shmfs and tmpfs. Whatever it finds will be > >> > statfs()'ed to be checked for Linux' fs magic for shmfs (0x01021994). > >> > >> What does it expect as a filesystem type if it does not find shmfs in > >> fstab but tmpfs? If it does not find tmpfs, will it try /tmp anyway > >> (but check for some fstype magic)? > > > > It searches for every mount which is of type tmpfs or shm. > > Whatever it finds must have the fs magic SHMFS_SUPER_MAGIC > > (0x01021994). It's in sysdeps/unix/sysv/linux/shm_open.c: > > > > ------------------------- snip ------------------- > > > > /* Now read the entries. */ > > while ((mp = __getmntent_r (fp, &resmem, buf, sizeof buf)) != NULL) > > /* The original name is "shm" but this got changed in early Linux > > 2.4.x to "tmpfs". */ > > This looks like it is creating real files there, and the tmpfs thing Yes, that's true. > shall make sure it is empty after a reboot. That's just an assumption... Possibly. I have also seen statements in mailing lists where they talk about that fs being some kind of memory based fs to increase speed. > > Do you have some temporary files in the location your /dev/shm points > to during running the linux application which needs it (I do not > expect that our implementation creates them, but as I haven't looked > at the code yet, this is something to be verified)? Yes. In the case of my application (SIMetrix) files with a size of approx. 1,3 MB are created and then removed. -Andre > > Bye, > Alexander. > > -- > Is death legally binding? > > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > -- Micro$oft: Which virus will you get today?