Re: swsusp: fix error handling in "not enough swap space"

Pavel Machek
2004-04-26T20:32:53Z

Hi!

> >>Funny, now it doesn't run BUG(), but, instead I have two way behavior.
> >>Either he is complaining that bash
> >>will not stop !! or that there is not enough pages free. Both wrong and
> >>bizzareus. This really needs fixing before 2.6.6 is out (imo).
> >
> >Dump stack at time when process refuses to stop, and see why it can't
> >be stopped. Then fix that :-).
> >
> Quite easy to say. I don't really understeand all changes that 've been
> done over mm between 2.6.6-rc2-bk2 and 2.6.5.

I know its easy to say ;-).

> Simple example. Mount something over nfs, than disconnect your network
> cable, and inside that dir run ls.
> Kernel will not be able to freeze bash !!, obvioulsy bug. I'll try to
> investigate it my self, but if someone can get with fast explanation, to
> enlight me problem, that would be nice.

Not obviously, and try to use less "!"s.

If you disconnect your /dev/hda, you'll not be able to suspend. Bug?
I'd call it design decision that allows me to keep it reasonably
simply. And I'd say that disconnected nfs is similar issue.

Anyway, feel free to submit a patch, and if it is simple enough, I'll
probably take it.

> Nfs is maybe a tougth example. Try i.e. dd bs=1 (to make it slower)
> if=/proc/kmem of=/dev/null,
> or even open mc, and press F3 on /proc/kmem, providing that your
> machines is slow. At that point, MC on my computer eats about 900MB of
> swap ! (I have only 128MB of ram, so it's quite strange). Anyways,
> echo "4" >/proc/acpi/sleep, and kernel will not be able to freeze
> it.

If you do something stupid, its okay that kernel is not able to
suspend. F3 on /dev/kmem counts as "something stupid". If you find out
something normal user (not root) can do... we are more likely to fix
that.

I'd say that /dev/kmem issue is not worth fixing. NFS issue may be
worth fixing, but I do not use NFS that much. Any other problems?

Pavel
--
934a471f20d6580d5aad759bf0d97ddc