linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* ramfs/tmpfs/shmfs  doubt
@ 2002-08-23  6:28 Anil Kumar
  2002-08-23  7:26 ` Jonathan Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Anil Kumar @ 2002-08-23  6:28 UTC (permalink / raw)
  To: linux-mm

Hello All,

   I have  a   doubt regarding use Of ramfs .In which cases should i
use ramfs/shmfs/tmpfs/ramdisk and how page cache is used in these cases?

   On my board i have 8 MB RAM and a Flash (to store Kernal and
Application code and persistent Application Data). Also i have no additional 
device to use it as a swap.So if for swap i have to use a part of
RAM(Compressed Swap suggested on this mailing list earlier).

   I am planning to create a file system at boot time in RAM and download
application binaries to that and run.RAM is limited so my  requirement is 
that i do not want to have two copies of data in the RAM (One in File
System i create and other one in Page Cache ).

  What is the best available mechanism i should follow?
   (Can  i use ramfs/tmpfs to solve the above problem?)

  Can i run a linux kernel disabling swapping (In my case no
 additional device for swap is available) ?

 Thanks a lot,  
 Anil


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

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

* Re: ramfs/tmpfs/shmfs  doubt
  2002-08-23  6:28 ramfs/tmpfs/shmfs doubt Anil Kumar
@ 2002-08-23  7:26 ` Jonathan Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Morton @ 2002-08-23  7:26 UTC (permalink / raw)
  To: Anil Kumar, linux-mm

>    I am planning to create a file system at boot time in RAM and download
>application binaries to that and run.RAM is limited so my  requirement is
>that i do not want to have two copies of data in the RAM (One in File
>System i create and other one in Page Cache ).

Tmpfs and shmfs are two names for the same thing (the latter is 
deprecated), and I believe it will do what you want.  It exists in 
the pagecache, and I understand this is routinely mapped into process 
space for execution.

Ramfs creates a whole new section of memory and treats it as a block 
device, and the pagecache is used in addition to that.  This is not 
what you want, and I understand ramfs itself is discouraged since 
tmpfs is now in widespread use.  Cramfs is still useful as it uses 
compression on the "block device".

>   Can i run a linux kernel disabling swapping (In my case no
>  additional device for swap is available) ?

Certainly.  Simply don't provide a swap device or run swapon.  It'll 
work just fine until you run out of RAM, in which case you'd be 
screwed in any case.  :o)  I naturally assume you'll be running quite 
lean and tightly-controlled apps on that.

-- 
--------------------------------------------------------------
from:     Jonathan "Chromatix" Morton
mail:     chromi@chromatix.demon.co.uk
website:  http://www.chromatix.uklinux.net/
geekcode: GCS$/E dpu(!) s:- a21 C+++ UL++ P L+++ E W+ N- o? K? w--- O-- M++$
           V? PS PE- Y+ PGP++ t- 5- X- R !tv b++ DI+++ D G e+ h+ r++ y+(*)
tagline:  The key to knowledge is not to rely on people to teach you it.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

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

end of thread, other threads:[~2002-08-23  7:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-23  6:28 ramfs/tmpfs/shmfs doubt Anil Kumar
2002-08-23  7:26 ` Jonathan Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox