Re: [PATCH] [Request for inclusion] Filesystem in Userspace

Miklos Szeredi
2004-12-01T13:36:10Z

> > Yes they, can: the allocation will fail, function will return -ENOMEM,
> > malloc will return NULL, pagefault will fail with OOM. This is
> > progress, though not the best sort. It is most certainly _not_ a
> > deadlock.
>
> Allocation won't fail! There's overcommit! Pagefault won't OOM, because
> it will wait for the pages to get laundered. And the pages won't get
> laundered untill the pagefault suceeds. (Yes, I know that you are going
> to mark the pages as dirty again so the pagefault won't wait for them,
> but you have to mention it.)

You didn't read the thread. I was talking about the page not being
counted as dirty in the first place (bdi->memory_backed = 1).

If you want to see a machine out of physical memory (you can have
plenty of free swap), just try filling up a ramfs filesystem. Don't
do it on the company's mission critical server though, cause some
people might be unhappy afterwards.

I tried it, and it's not very nice. Even the OOM killer went to work
though swap was far from full. And the end result was a perfectly
responsive, but not very useful system.

So please don't try to tell me that:

a) it will deadlock: it won't, not even if userspace calls back,
because the memory is _not_ reclaimable

b) it's not a good solution: I _know_, all I'm trying to show that a
deadlock is _not_ inherent in a userspace filesystem

Constructive comments are appreciated, others will go to /dev/null.

Thanks,
Miklos