Re: PATCH: allow percentile size of tmpfs (2.5.66 / 2.4.20-pre2)

Hugh Dickins
2003-04-07T11:42:27Z

On Mon, 7 Apr 2003, Christoph Rohland wrote:
> On Wed, 2 Apr 2003, Hugh Dickins wrote:
> > Don't blame Christoph for that, one of these days I'll face up to
> > my responsibilities and make swapoff fail (probably get itself
> > OOM-killed) instead of having everything else OOM-killed.
>
> The hooks for the accounting would solve this easily: the swapoff hook
> would realize that there is not enough space left for the tmpfs
> instance and simply return an error. So swapoff would fail.
> We would not even stress the vm to swapin all pages until
> realizingthat there is not enough memory left.

You're supposing that it's tmpfs causing this problem: not at all,
that's just an easy way to show it. Take away tmpfs, and swapoff
is still liable to hang, with other tasks OOMing (even when strict
no-overcommit accounting: I've not yet added the check it needs).

Hugh