Skip to contentSkip to conversation

make shm filesystem part configurable

PATCH In review Christoph Rohland 4 participants 10 messages Jan 13, 2001 – Jan 14, 2001

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make shm filesystem part configurable

Hi,

The appended patch (additional to my read/write support patch) makes the shm filesystem configurable and renames it to the more sensible name swapfs. Since the fs type "shm" is quite established with 2.4 I register that name also.

It also updates the documentation.

Greetings
Christoph

Documentation/Changes +0 -14
diff -uNr 2.4.0-shm_vm_locked-truncate-rw/Documentation/Changes 2.4.0-shm_vm_locked-truncate-rw-swapfs/Documentation/Changes
@@ -114,20 +114,6 @@
 DevFS is now in the kernel.  See Documentation/filesystems/devfs/* in
 the kernel source tree for all the gory details.
 
-System V shared memory is now implemented via a virtual filesystem.
-You do not have to mount it to use it. SYSV shared memory limits are
-set via /proc/sys/kernel/shm{max,all,mni}.  You should mount the
-filesystem under /dev/shm to be able to use POSIX shared
-memory. Adding the following line to /etc/fstab should take care of
-things:
-
-none		/dev/shm	shm		defaults	0 0
-
-Remember to create the directory that you intend to mount shm on if
-necessary (The entry is automagically created if you use devfs). You
-can set limits for the number of blocks and inodes used by the
-filesystem with the mount options nr_blocks and nr_inodes.
-
 The Logical Volume Manager (LVM) is now in the kernel.  If you want to
 use this, you'll need to install the necessary LVM toolset.
 
Documentation/Configure.help +29 -19

66 lines not on this page · raw message

fs/Config.in +1 -0
diff -uNr 2.4.0-shm_vm_locked-truncate-rw/fs/Config.in 2.4.0-shm_vm_locked-truncate-rw-swapfs/fs/Config.in
@@ -29,6 +29,7 @@
 	int 'JFFS debugging verbosity (0 = quiet, 3 = noisy)' CONFIG_JFFS_FS_VERBOSE 0
 fi
 tristate 'Compressed ROM file system support' CONFIG_CRAMFS
+bool 'Swap file system support (former shm fs)' CONFIG_SWAPFS
 tristate 'Simple RAM-based file system support' CONFIG_RAMFS
 
 tristate 'ISO 9660 CDROM file system support' CONFIG_ISO9660_FS
mm/shmem.c +80 -57

270 lines not on this page · raw message

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw

shmem or swapfs? was: [Patch] make shm filesystem part configurable

Quoted 6 lines · Christoph Rohland

Hi,

The appended patch (additional to my read/write support patch) makes the shm filesystem configurable and renames it to the more sensible name swapfs. Since the fs type "shm" is quite established with 2.4 I register that name also.

Now...is this shared memory or swap? If it's swap, why is it different than a swapfile? If you are intending the shmem be called swapfs, I personally thing that it'll cause a significant amount of confusion.

-d

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

In reply to Christoph Rohland
Quoted 4 lines · David Ford

Now...is this shared memory or swap? If it's swap, why is it different than a swapfile? If you are intending the shmem be called swapfs, I personally thing that it'll cause a significant amount of confusion.

It is a filesystem which lives in RAM and can swap out. SYSV shm and shared anonymous maps are still build on top of this (The config option only disables the part not needed for this).

I am quite open about naming, but "shm" is not appropriate any more since the fs does a lot more than shared memory. Solaris calles this "tmpfs" but I did not want to 'steal' their name and I also do not think that it's a very good name.

So any suggestions for a better name?

Greetings
Christoph

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#7 lore raw

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

In reply to Christoph Rohland
Quoted 10 lines

It is a filesystem which lives in RAM and can swap out. SYSV shm and shared anonymous maps are still build on top of this (The config option only disables the part not needed for this).

I am quite open about naming, but "shm" is not appropriate any more since the fs does a lot more than shared memory. Solaris calles this "tmpfs" but I did not want to 'steal' their name and I also do not think that it's a very good name.

So any suggestions for a better name?

Hmm, ok, what are the activities that use this other than shm?

-d

-- ---NOTICE

-- fwd: fwd: fwd: type emails will be deleted automatically.
"There is a natural aristocracy among men. The grounds of this are virtue and talents", Thomas Jefferson [1742-1826], 3rd US President

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#8 lore raw

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

In reply to Christoph Rohland
Quoted 1 line · David Ford

Hmm, ok, what are the activities that use this other than shm?

You can e.g. use it for your /tmp filesystem. there seem to be some people out there which used ramfs for that...

What do you think about "vmfs"? This probably reflects its nature better than swapfs.

Greetings
Christoph

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

In reply to Christoph Rohland
Quoted 4 lines · Christoph Rohland

I am quite open about naming, but "shm" is not appropriate any more since the fs does a lot more than shared memory. Solaris calles this "tmpfs" but I did not want to 'steal' their name and I also do not think that it's a very good name.

Admins already know what "tmpfs" means, so you should just call your filesystem that. I know it isn't a pretty name, but in the interest of reducing confusion, you should use the existing name.

Don't think of it as just "for /tmp". It is for temporary storage. The name is a reminder that you shouldn't store archives in tmpfs.

Again for compatibility, Sun's size option would be useful.

-o size=111222333      Size in bytes, rounded up by page size.
-o size=111222k        Size in kilobytes (base-2 or ISO standard?)
-o size=111m           Size in megabytes (base-2 or ISO standard?)

I'd prefer k for ISO standard and K for base-2.
Of course m isn't millibytes, but that isn't horrible.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#9 lore raw

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

In reply to Christoph Rohland
Quoted 2 lines · Christoph Rohland

What do you think about "vmfs"? This probably reflects its nature better than swapfs.

That sounds applicable and pretty good.

-d

-- ---NOTICE

-- fwd: fwd: fwd: type emails will be deleted automatically.
"There is a natural aristocracy among men. The grounds of this are virtue and talents", Thomas Jefferson [1742-1826], 3rd US President

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#4 lore raw

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

In reply to Albert D. Cahalan

Hi Albert,

Quoted 6 lines · Albert D. Cahalan

Admins already know what "tmpfs" means, so you should just call your filesystem that. I know it isn't a pretty name, but in the interest of reducing confusion, you should use the existing name.

Don't think of it as just "for /tmp". It is for temporary storage. The name is a reminder that you shouldn't store archives in tmpfs.

OK right now I see two alternatives for the name: "tmpfs" for the SUN admins and "vmfs" for expressing what it does and to be in line with "ramfs". Any votes?

Quoted 8 lines

Again for compatibility, Sun's size option would be useful.

(quoted diff) +0 -3
-o size=111222333      Size in bytes, rounded up by page size.
-o size=111222k        Size in kilobytes (base-2 or ISO standard?)
-o size=111m           Size in megabytes (base-2 or ISO standard?)

I'd prefer k for ISO standard and K for base-2. Of course m isn't millibytes, but that isn't horrible.

No, I would go for base-2 only. That's what we typically mean with K and M in the IT world. To be case sensitive is IMHO overkill and confusing.

Greetings
Christoph

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#5 lore raw

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

In reply to Albert D. Cahalan
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Christoph" == Christoph Rohland <[email protected]> writes:

Christoph> OK right now I see two alternatives for the name: "tmpfs" Christoph> for the SUN admins and "vmfs" for expressing what it does Christoph> and to be in line with "ramfs". Any votes?

I think vmfs is the better choice. Not to be gratuitously incompatable with sun, but there is no guarentee linux's implementation and sun's will be or remain compatable, so it really doesn't hurt to choose a name which is more descriptive rather than that used by someone else's product -- even if the other product is widely deployed and understood.

Quoted 2 lines
Quoted 2 lines

I'd prefer k for ISO standard and K for base-2. Of course m isn't millibytes, but that isn't horrible.

Christoph> No, I would go for base-2 only. That's what we typically Christoph> mean with K and M in the IT world. To be case sensitive is Christoph> IMHO overkill and confusing.

Unquestionably the Right Thing. VM is after all being measured, and RAM is always measured in binary. (OK, I just *know* someone will provide a counter-example disproving that assertion -- perhaps the old 36 bit systems? Or core? But are there any modern counter-examples?)

-JimC

Signature · 6 lines
James H. Cloos, Jr.  <http://jhcloos.com/public_key>     1024D/ED7DAEA6 
<[email protected]>  E9E9 F828 61A4 6EA9 0F2B  63E7 997A 9F17 ED7D AEA6
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#6 lore raw

Re: shmem or swapfs? was: [Patch] make shm filesystem part configurable

In reply to Albert D. Cahalan
Quoted 4 lines · Dominik Kubla

Well, it's tmpfs not only on SUN but for *BSD too. So i guess we should follow the pack and use this name to avoid yet another "it's called this under that Unix and this under the other and something else under Linux" case.

So does *BSD also have the size parameter?

Greetings
Christoph

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/