Re: Break 2.4 VM in five easy steps

Helge Hafting
2001-06-07T07:25:43Z

Derek Glidden wrote:
>
> Helge Hafting wrote:
> >
> > The drive is inactive because it isn't needed, the machine is
> > running loops on data in memory. And it is unresponsive because
> > nothing else is scheduled, maybe "swapoff" is easier to implement
>
> I don't quite get what you're saying. If the system becomes
> unresponsive because the VM swap recovery parts of the kernel are
> interfering with the kernel scheduler then that's also bad because there
> absolutely *are* other processes that should be getting time, like the
> console windows/shells at which I'm logged in. If they aren't getting
> it specifically because the VM is preventing them from receiving
> execution time, then that's another bug.
>
Sure. The kernel doing a big job without scheduling anything
is a problem.

> I'm not familiar enough with the swapping bits of the kernel code, so I
> could be totally wrong, but turning off a swap file/partition should
> just call the same parts of the VM subsystem that would normally try to
> recover swap space under memory pressure.

A problem with this is that normal paging-in is allowed to page other
things out as well. But you can't have that when swap is about to
be turned off. My guess is that swapoff functionality was perceived to
be so seldom used that they didn't bother too much with scheduling
or efficiency.

I don't have the same problem myself though. Shutting down with
30M or so in swap never take unusual time on 2.4.x kernels here,
with a 300MHz processor. I did a test while typing this letter,
almost filling the 96M swap partition with 88M. swapoff
took 1 minute at 100% cpu. This is long, but the machine was responsive
most of that time. I.e. no worse than during a kernel compile.
The machine froze 10 seconds or so at the end of the minute, I can
imagine that biting with bigger swap.

Helge Hafting