Messages in this thread | | | Date | Tue, 21 Mar 2000 23:59:55 +0100 | From | Jamie Lokier <> | Subject | Re: Memory Mapped Filesystem |
| |
Thomas Pornin wrote: > 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 ?
Nearly. The recently added shmfs handles the memory management issues and, being widely used, will get fairly thorough testing.
> -- 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". > -- does all this make sense ? Is there a better solution ?
Most of what you ask has been carefully implemented for shmfs, except for the filesystem part :-)
I.e., memory files were effectively added recently. However, I think for tmpfs you need to add read/write support (shmfs only does mmap I think), some way to extend/truncate the files, and a directory structure.
> -- what happens if I create a file on such a filesystem and try to > swapon it ?
Only one way to find out :-)
-- Jamie
- 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/
| |