Re: Userspace filesystems (WAS: Encrypted Filesystem)

From: Pavel Machek
Date: Mon Feb 02 2004 - 10:22:38 EST


Hi!

> > > app wants to read data from a file ->
> > > userspace application requires memory allocation to provide this data ->
> > > VM tries to write out dirty data associated with the Coda mountpoint ==
> > > deadlock
> >
> > How do you solve this one?
>
> 1) In FUSE normal writes go through the cache, so no dirty pages are
> created. The only possibility to create dirty pages is with shared
> writable mapping, and this is rare
>
> 2) Userspace filesystem app can be multithreaded, so probably write
> can be satisfied even if read is pending.
>
> 3) The 2.6 kernel provides asynchronous page writeback, so even if a
> writeback is blocking forever the VM will continue to try to free
> up memory.
>
> 4) If no memory can be freed, then the allocation will fail, so the
> read will fail: no deadlock.

Transient real failure looks pretty ugly. I'd not expect
read(/etc/passwd) to return -ENOMEM, and read(/#ftp:somewhere/passwd)
should be the same, but as this is basically "can not happen"... I
guess that's enough.
Pavel

--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/