From: Rob Landley <rob@landley.net>
To: Indrek Kruusa <indrek.kruusa@tuleriit.ee>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [QUESTION] Filesystem like structure in RAM w/o using filesystem (not ramdisk)
Date: Sun, 4 Dec 2005 18:39:46 -0600 [thread overview]
Message-ID: <200512041839.46914.rob@landley.net> (raw)
In-Reply-To: <438EE256.6040403@tuleriit.ee>
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.
prev parent reply other threads:[~2005-12-05 16:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-01 11:45 Indrek Kruusa
2005-12-01 12:20 ` Hesse, Christian
2005-12-01 12:57 ` Bernd Eckenfels
2005-12-05 0:39 ` Rob Landley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200512041839.46914.rob@landley.net \
--to=rob@landley.net \
--cc=indrek.kruusa@tuleriit.ee \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®