[linux-mm-cc] Compcache as Ramdisk

John McCabe-Dansted gmatht at gmail.com
Fri Jul 10 00:51:34 EDT 2009


On Fri, Jul 10, 2009 at 12:38 PM, Vijayendra Suman <
vijayendra.suman at gmail.com> wrote:

> Hi,
>
> I want to use compcache 0.3 release as ramfs, which could be used for
> processes for shred memory communication.
> Currently, I compcache acts as virtual block driver and act as swap
> Filesystem
>
> 1) swapoff compcache partition
> 2) mkfs.vfat -F 32 -S 4096 /dev/ramzswap0
> 3) mount /dev/ramzswap0 /mnt


ramzswap is not a generic block device, so as I understand you cannot mount
normal filesystems on it (It only supports I/O of size PAGE_SIZE).

Would something like the following suffice?

1) swapon /dev/ramzswap
2) mount -t tmpfs -o size=1G,nr_inodes=10k,mode=0700 tmpfs /space

http://en.wikipedia.org/wiki/TMPFS

The linux kernel should swap out tmpfs pages that have not been frequently
used, so this should be fairly close to what you want. tmpfs is probably a
better fit for this than vfat anyway.



-- 
John C. McCabe-Dansted
PhD Student
University of Western Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/linux-mm-cc/attachments/20090710/543a7b12/attachment.htm 


More information about the linux-mm-cc mailing list