Messages in this thread | | | Date | Tue, 21 Mar 2000 17:45:47 +0100 | From | Thomas Pornin <> | Subject | Memory Mapped Filesystem |
| |
Hello,
I converted yesterday an Alpha station to ext3 (and it works great). However, I kept /tmp as ext2 since the README distributed with ext3 says that it would be more efficient this way. This is somehow inelegant, since this means that there is still one fsck (which can fail).
I could do an automatic mke2fs on the device, at boot time, since this is /tmp. However, with automatic numbering of partitions, I feel a bit unsafe with a mke2fs in a boot script.
So I remembered that, under FreeBSD, I use mfs for /tmp: a filesystem mapped in memory. This is not quite a ramdisk since: -- it can be swapped out -- it frees unsued pages when a file is removed Somehow, this is like sharing space for /tmp and swap. I find this scheme elegant and it would fit my needs.
Therefore, I intend to implement such a filesystem. For this, I need some help; specifically, I ask myself the following questions: -- does such a filesystem already exists ? -- would it be easier to modify the ramdisk to be able to be swapped out, and stubs in one filesystem to unmap unused pages ? -- how do I allocate memory from within the kernel, such that this memory might be swapped out ? I can do a do_mmap(), but, from my (rather low) understanding of the memory management in Linux, this mapping would be specific to one process. I could run a kernel thread (well, at least I believe I could) but I would run into the "Minix-single-threaded-filesystem". -- what happens if I create a file on such a filesystem and try to swapon it ? -- does all this make sense ? Is there a better solution ?
Thanks for any information,
--Thomas Pornin
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |