All of lore.kernel.org
 help / color / mirror / Atom feed
* [QUESTION] Filesystem like structure in RAM w/o using filesystem (not ramdisk)
@ 2005-12-01 11:45 Indrek Kruusa
  2005-12-01 12:20 ` Hesse, Christian
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Indrek Kruusa @ 2005-12-01 11:45 UTC (permalink / raw)
  To: linux-kernel

Hello!

As I have understood the accessing ramdisk goes through the same kernel 
path which is meant for accessing slow block device (i_nodes caching etc.).
Is there any other common way (some API above shared memory?) to 
create/open/read/write globally accessible hierarchical datablocks in RAM?
Could it be possibly faster than ramdisk?

Thanks in advance,
Indrek


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [QUESTION] Filesystem like structure in RAM w/o using filesystem (not ramdisk)
  2005-12-01 11:45 [QUESTION] Filesystem like structure in RAM w/o using filesystem (not ramdisk) Indrek Kruusa
@ 2005-12-01 12:20 ` Hesse, Christian
  2005-12-01 12:57 ` Bernd Eckenfels
  2005-12-05  0:39 ` Rob Landley
  2 siblings, 0 replies; 4+ messages in thread
From: Hesse, Christian @ 2005-12-01 12:20 UTC (permalink / raw)
  To: Indrek Kruusa; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

On Thursday 01 December 2005 12:45, Indrek Kruusa wrote:
> Hello!
>
> As I have understood the accessing ramdisk goes through the same kernel
> path which is meant for accessing slow block device (i_nodes caching etc.).
> Is there any other common way (some API above shared memory?) to
> create/open/read/write globally accessible hierarchical datablocks in RAM?
> Could it be possibly faster than ramdisk?

You should take a look at tmpfs, I think that is what you search for.
-- 
Christian

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [QUESTION] Filesystem like structure in RAM w/o using filesystem (not ramdisk)
  2005-12-01 11:45 [QUESTION] Filesystem like structure in RAM w/o using filesystem (not ramdisk) Indrek Kruusa
  2005-12-01 12:20 ` Hesse, Christian
@ 2005-12-01 12:57 ` Bernd Eckenfels
  2005-12-05  0:39 ` Rob Landley
  2 siblings, 0 replies; 4+ messages in thread
From: Bernd Eckenfels @ 2005-12-01 12:57 UTC (permalink / raw)
  To: linux-kernel

In article <438EE256.6040403@tuleriit.ee> you wrote:
> As I have understood the accessing ramdisk goes through the same kernel 
> path which is meant for accessing slow block device (i_nodes caching etc.).
> Is there any other common way (some API above shared memory?) to 
> create/open/read/write globally accessible hierarchical datablocks in RAM?

SYSV IPC Shared Memory?

> Could it be possibly faster than ramdisk?

I think if you mmap tmpfs files it is pretty good, which  is what libc is
doing for shm emulation.

Gruss
Bernd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [QUESTION] Filesystem like structure in RAM w/o using filesystem (not ramdisk)
  2005-12-01 11:45 [QUESTION] Filesystem like structure in RAM w/o using filesystem (not ramdisk) Indrek Kruusa
  2005-12-01 12:20 ` Hesse, Christian
  2005-12-01 12:57 ` Bernd Eckenfels
@ 2005-12-05  0:39 ` Rob Landley
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Landley @ 2005-12-05  0:39 UTC (permalink / raw)
  To: Indrek Kruusa; +Cc: linux-kernel

On Thursday 01 December 2005 05:45, Indrek Kruusa wrote:
> Hello!
>
> As I have understood the accessing ramdisk goes through the same kernel
> path which is meant for accessing slow block device (i_nodes caching etc.).
> Is there any other common way (some API above shared memory?) to
> create/open/read/write globally accessible hierarchical datablocks in RAM?
> Could it be possibly faster than ramdisk?

You can use ramfs which stores data in the page cache (no block device backing 
it, and no filesystem driver).  That's about as simple as you're going to 
get.

An expanded version of ramfs is tmpfs.  This allows you to set size limits 
(which you need to allow anybody other than root write access to one of these 
things; otherwise you can fill up memory and trivially bring down the 
system), and also allows the data to be swapped out (ramfs pins the dirty 
pages in memory, since there's no backing block device for it to be flushed 
to it just vetoes all attempts to do so.  Tmpfs substitutes the normal swap 
mechanism, whatever swap partitions or swap files you've set up.)

I have no idea what would happen if you tried to enable a swap file on a tmpfs 
mount, but since only root could be try that particular bit of peversity, 
it's almost certainly a "don't do that then"...

> Thanks in advance,
> Indrek

Rob
-- 
Steve Ballmer: Innovation!  Inigo Montoya: You keep using that word.
I do not think it means what you think it means.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-12-05 16:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-01 11:45 [QUESTION] Filesystem like structure in RAM w/o using filesystem (not ramdisk) Indrek Kruusa
2005-12-01 12:20 ` Hesse, Christian
2005-12-01 12:57 ` Bernd Eckenfels
2005-12-05  0:39 ` Rob Landley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.