From: Miklos S. <mi...@sz...> - 2006-09-26 15:12:05
|
> Hi all, I am giving a seminar about FUSE to my ph.d. fellows, in two days :) > I already know the basics of fuse since I develop(ed) the ocaml bindings > and my dream filesystem, however there are questions that I never asked > myself: > > 1. Is data copied when read or written to the filesystem? Yes. Normally there are two copies: - copy between page cache and the process using the filesystem - copy between page cache and filesystem daemon With 'direct_io', the page cache is left out. Or if a program uses mmap, then it can read directly from the page cache. > If yes, would it be possible to avoid this some way? Perhaps > modifying the kernel? If no, how do you do that, I mean, letting an > userspace process read, or even worse, write, into other processes > memory (the buffer passed to read and write)? Yes, this can be done, though I haven't thought about it too deeply. Probably it isn't trivial. Also the overhead of memory copy tends to be overrated. For example 'cp' uses read() and write() instead of memory mapping the source and target files and it still performs well, probably better than with mmap(). I have a vague memory about the reasons being discussed on LKML: something about the cost of setting up virtual address translation being higher than that of the memory copy. > 3. Has some FUSE filesystem being passed trough some testing suite, or POSIX > compliance test? What were the results? I run the filesystem tests from LTP before a release, but that does not check full POSIX compliance. > 4. In particular to Miklos: are there technical remarks you think should be > appropriate to an audience of ph.d. studends mainly in the area of > operating systems development? Or in other words: how would you prefer > young researchers to perceive FUSE? :) Hmm, the hardest question :) Generally I try to follow the UNIX tradition in keeping interfaces simple. The only novelty of FUSE (and LUFS) compared with other userspace filesystem frameworks is the simplicity of the path based high-level API, which I think played a major role in FUSE's success. > In exchange, I will put the slides online under the GPL :) Cool :) Miklos |