On Friday 25 November 2005 03:55, Jeff Dike wrote: > On Thu, Nov 24, 2005 at 06:11:01AM -0600, Rob Landley wrote: > > So my question is, could system v shared memory be used in place of the > > tmpfs mount? (Can it be mapped in the right location and inherited > > across fork()?) > > tmpfs and shmfs are two names for the same underlying code.
Yes, but when tmpfs is not configured into the kernel it isn't exposed to userspace as a mountable filesystem, so the only way to _access_ it is sometimes through the sysv shared memory API. I agree that using the sysv API probably isn't worth the effort if we've got a good workaround. I have a workaround, so I'm unlikely to code it up. > I think the shmfs mount is for the benefit of things that use SysV shared > memory. Yup, but it was standard practice to do this back in the 2.4 days, while mounting /tmp as tmpfs is _not_ done on such recent systems as ubuntu "horny hedgehog", which shipped earlier this year. I'm not worried about 2.4 systems because they had the "deleted files don't get synced to disk" hack that got yanked in 2.6, so the pathological behavior I'm seeing shouldn't show up on them even though for them /tmp isn't usually tmpfs. Instead, this pathological behavior only shows up when you do something that constantly dirties a lot of pages on a 2.6 system where /tmp isn't tmpfs. > So, no. Just use tmpfs on /tmp. If I can guarantee that I have root access to all the systems my code is running on and can make that kind of administrative change, then there's not a whole lot of point in me bothering with UML in the first place. Setting TMPDIR to point to /dev/shm seems to be a decent workaround, but I'm not sure how portable it is. (Is there a system out there where /tmp is mounted tmpfs but /dev/shm isn't? Right now I'm testing if /dev/shm exists and assuming it's tmpfs if so.) But documenting that UML -skas0 performance is going to not only suck rocks but bog down the rest of your system very very noticeably when you run on 2.6 and its temp file isn't on tmpfs might be a useful thing to do. > Jeff Rob -- Steve Ballmer: Innovation! Inigo Montoya: You keep using that word. I do not think it means what you think it means. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel