Re: [discussion] Swap overcommitment recovery

david (david@intervista.net)
Mon, 17 Aug 1998 13:37:45 -0700 (PDT)


> It doesn't have to be a special thread, it can run inside
> kswapd's context. See the [PATCH] I posted sunday. If you
> are interested in a solution, please test the patch.

I'll take a look at it.

> As soon as I get reactions, I'll adjust the code, make it
> sysctl tunable and generally beautify it. If nobody is
> interested, I'll leave the code the quick and dirty way
> it is now :)

I am positive you'll get reactions both now and in the future :)

> Not always a good idea. The biggest ram sucker might have
> been running for 2 weeks without doing any new allocations.
> This means wasting 2 weeks of CPU time _and_ killing a
> 'good guy'.

Agreed...in most respects. I often have netscape running for well past a
week. However, this is often the program that all of a sudden slides us
into the overcommitment situation. All said, I also believe this would be
a bad algorithm with which to kill a program.

> > - kill the program requesting a page right now
> Bad idea, this program might control some hardware (X) leading
> to a system crash anyway.

Fully agreed.

> > - start killing user programs until the condition clears leading to:
> > - start killing root programs ... leading to:
> This is a little bit crude, don't you think. Look at my patch for

Very crude.

> > - init is the only thing left, something must be really wrong, now is the
> > time to attempt disable writes, sync, mount RO, call our internal reboot
> > methods.
> This part isn't implemented yet, but it should indeed be included.
> Syncing and umounting the disks should almost guarantee a fast
> system startup with minimal downtime.

Completely agree. Data integrity is quite important. I have yet to see
your patch, but I think I'll find an increasing order of kill level to
grant the process(es) a clean shutdown.

> This is why a good-enough solution in kernelspace is preferable.
> Killing something is bound to make someone unhappy, so not
> making it configurable will place the blaim on me instead of
> on some innocent sysadmin... Besides, it will force people to
> carefully make sure they don't run out of swap often, which is
> a far better solution.

To be quite honest, I prefer many kernel solutions but I was
willing to let something in userland exist so as to quiet some of the
shouting.

Ah, here is the patch :)

I'll get back to you on it.

-d

Look, look, see Windows 98. Buy, lemmings, buy!
(c) 1998 David Ford. Redistribution via the Microsoft Network is prohibited.
for linux-kernel: please read linux/Documentation/* before posting problems

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html