Christoph Rohland wrote:
> Hi,
>
> Apparently there is a lack of information about tmpfs out there.
I aggree, and ramfs et al.
> So I would like to reduce the Configure.help entry and instead
> introduce a file Documentation/filesystems/tmpfs with more details.
>
> My proposal is appended. Feedback about content and english language
> is highly appreciated.
>
> Greetings
> Christoph
>
> ------------------------------------------------------------------------
>
> Tmpfs is a file system which keeps all files in virtual memory.
>
> Everything is temporary in the sense that no files will be created on
> your hard drive. If you reboot, everything in tmpfs will be lost.
>
> In contrast to RAM disks, which get allocated a fixed amount of
> physical RAM, tmpfs grows and shrinks to accommodate the files it
> contains and is able to swap unneeded pages out to swap space.
That isn't the case now since ramdisks were
integrated with the buffer cache:
$ dd if=/dev/zero of=/tmp/use_mem bs=1024 count=20000
$ cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 129966080 122720256 7245824 49152 65863680 28745728
Swap: 0 0 0
MemTotal: 126920 kB
MemFree: 7076 kB
MemShared: 48 kB
Buffers: 64320 kB
Cached: 28072 kB
SwapCached: 0 kB
Active: 10308 kB
Inact_dirty: 80196 kB
Inact_clean: 1936 kB
Inact_target: 26200 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 126920 kB
LowFree: 7076 kB
SwapTotal: 0 kB
SwapFree: 0 kB
$ rm /tmp/use_mem
$ cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 129966080 101957632 28008448 49152 65863680 8290304
Swap: 0 0 0
MemTotal: 126920 kB
MemFree: 27352 kB
MemShared: 48 kB
Buffers: 64320 kB
Cached: 8096 kB
SwapCached: 0 kB
Active: 10352 kB
Inact_dirty: 60196 kB
Inact_clean: 1916 kB
Inact_target: 26200 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 126920 kB
LowFree: 27352 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Padraig.
Hi Padraig,
On Wed, 28 Nov 2001, Padraig Brady wrote:
>> In contrast to RAM disks, which get allocated a fixed amount of
>> physical RAM, tmpfs grows and shrinks to accommodate the files it
>> contains and is able to swap unneeded pages out to swap space.
>
>
>
> That isn't the case now since ramdisks were integrated with the
> buffer cache:
What isn't the case any more?
> $ dd if=/dev/zero of=/tmp/use_mem bs=1024 count=20000
On what filesystem is /tmp/use_mem located? What do you want to show?
Greetings
Christoph
Christoph Rohland wrote:
> Hi Padraig,
>
> On Wed, 28 Nov 2001, Padraig Brady wrote:
>
>>>In contrast to RAM disks, which get allocated a fixed amount of
>>>physical RAM, tmpfs grows and shrinks to accommodate the files it
>>>contains and is able to swap unneeded pages out to swap space.
>>>
>>
>>
>>That isn't the case now since ramdisks were integrated with the
>>buffer cache:
>>
>
> What isn't the case any more?
Because the RAM is now (de)allocated as required.
>
>>$ dd if=/dev/zero of=/tmp/use_mem bs=1024 count=20000
>>
>
> On what filesystem is /tmp/use_mem located? What do you want to show?
Filesystem? ext2 on /dev/ram1(rd.o)
meminfo shows the memory being reclaimed as the file is deleted.
Padraig.
> >>>In contrast to RAM disks, which get allocated a fixed amount of
> >>>physical RAM, tmpfs grows and shrinks to accommodate the files it
> >>>contains and is able to swap unneeded pages out to swap space.
> >>That isn't the case now since ramdisks were integrated with the
> >>buffer cache:
> > What isn't the case any more?
> Because the RAM is now (de)allocated as required.
> Filesystem? ext2 on /dev/ram1(rd.o)
> meminfo shows the memory being reclaimed as the file is deleted.
And this is transparent to {any|the ext2fs} underlying filesystem?
What if I use xfs, rasierfs, ntfs, $* ?
-mirabilos
--
Redistribution of this message body via AOL or the
Microsoft network strictly prohibited.
Quotation permitted if due credit is given.
(Excuse the X-Mailer, accusate my ISP for that)