Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Nix
On Sat, 26 Nov 2005, [EMAIL PROTECTED] announced authoritatively: > On Friday 25 November 2005 22:04, Nix wrote: >> On Fri, 25 Nov 2005, Rob Landley moaned: >> > On Friday 25 November 2005 13:33, Nix wrote: > >> > Actually, I consider the fact the OOM killer doesn't delete files out of >> > tmpfs

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Chris Lightfoot
On Fri, Nov 25, 2005 at 02:18:43PM -0600, Rob Landley wrote: > Using /tmp for anything has been kind of discouraged for a while, because > throwing any insufficiently randomized filename in there is a security hole > waiting to happen. Which case are you worried about here? SFAIK all the filesys

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Blaisorblade
On Friday 25 November 2005 22:04, Nix wrote: > On Fri, 25 Nov 2005, Rob Landley moaned: > > On Friday 25 November 2005 13:33, Nix wrote: > > Actually, I consider the fact the OOM killer doesn't delete files out of > > tmpfs mounts to be a potential disadvantage in this context. Not quite understo

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Nix
On Fri, 25 Nov 2005, Rob Landley moaned: > On Friday 25 November 2005 13:33, Nix wrote: >> Maybe this is a stupid question, but... why do *any* systems other than >> extremely memory-constrained ones not mount tmpfs on /tmp? It seems to >> me to have numerous advantages and no disadvantages. > > A

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Rob Landley
On Friday 25 November 2005 13:33, Nix wrote: > On Fri, 25 Nov 2005, Rob Landley uttered the following: > > A) mlock would be a bad thing. Not only is it a trivial DOS waiting to > > happen but I like the UML physmem being swapped out under memory > > pressure. I just don't want uselessly writing

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Nix
On Fri, 25 Nov 2005, Rob Landley uttered the following: > A) mlock would be a bad thing. Not only is it a trivial DOS waiting to > happen > but I like the UML physmem being swapped out under memory pressure. I just > don't want uselessly writing it to disk over and over in the absence of any

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Rob Landley
On Friday 25 November 2005 09:03, Chris Lightfoot wrote: > On Fri, Nov 25, 2005 at 02:56:49PM +, Nix wrote: > > You could certainly do just that with POSIX shm :) > > Another option is to mlock the memory, which should > prevent paging, but requires root. I have a patch which > does this using

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Nix
On Fri, 25 Nov 2005, Chris Lightfoot murmured woefully: > On Fri, Nov 25, 2005 at 02:56:49PM +, Nix wrote: >> You could certainly do just that with POSIX shm :) > > Another option is to mlock the memory, which should > prevent paging, but requires root. I have a patch which > does this using a

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Chris Lightfoot
On Fri, Nov 25, 2005 at 02:56:49PM +, Nix wrote: > You could certainly do just that with POSIX shm :) Another option is to mlock the memory, which should prevent paging, but requires root. I have a patch which does this using a helper binary, if people would like it. -- ``As usual the Libera

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Nix
On Thu, 24 Nov 2005, Rob Landley uttered the following: > There is a tmpfs mount, it's /dev/shm. And apparently, even if tmpfs isn't > exposed as a separate filesystem, system V shared memory will still use it. s/System V/POSIX/ It's the shm_open()/shm_close()shm_unlink() functions you're looki

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Rob Landley
On Friday 25 November 2005 04:52, Rob Landley wrote: > FYI: > > The mounts on a Fedora Core 4 system: ... > The mounts on the x86-64 PLD system I've been borrowing (and on which I do > not have root access): ... > The shell servers from sourceforge: ... > And I reiterate that on my ubuntu laptop /t

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Rob Landley
FYI: The mounts on a Fedora Core 4 system: /dev/hda2 on / type ext3 (rw) /dev/proc on /proc type proc (rw) /dev/sys on /sys type sysfs (rw) /dev/devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/hda1 on /boot type ext3 (rw) /dev/shm on /dev/shm type tmpfs (rw) /dev/hdb1 on /home type ext3 (

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Rob Landley
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 shm

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Jeff Dike
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. I think the shm

Re: [uml-devel] When /tmp is not tmpfs.

2005-11-25 Thread Rob Landley
On Thursday 24 November 2005 14:40, Blaisorblade wrote: > However, I just found out, see shmctl(2), that IPC_RMID implements the > refcount "garbage collection" algorithm, so apparently it *could* be used. > > The question is if we want it, and considering the new features being added > to shmfs, t