Re: swap with free mem?

Rik van Riel (
Tue, 28 Jul 1998 18:27:50 +0200 (CEST)

On Mon, 27 Jul 1998, Mike Panetta wrote:

> Is the linux kernel supposed to allow swaps to disk when there is
> free mem? (like more than 1MB free) should the swap be cleared after
> the swapped process is killed? Or is it ok for it to accumulate? I

Linux swaps only when it needs memory, but it is very much OK
to leave stuff on swap when there's still some swap free.
This is done because:
- often pages are not written to (dirtied) in memory, and when
they are still on swap we don't have to write the page again
- the memory (now free) could be used again soon (think large
compile job) and generating extra disk I/O just to clean up
the swap is a waste of time and performance
- there is no reason why we should swap in a page that isn't

> have been haveing free memmory probs lately since I have started
> disk intensive io tests (bonnie making a cd image etc) and once
> somehow I got my 2.0.34 kernel to crash with a message to the tone
> of "free list corrupted" and once again with "trying to free non
> free page". these messages are from my memory as this wasnt logged.
> Can anyone here explain to me what this means? Is something broke?

Damn, this does look kinda serious. It usually means a faulty
DMA chipset or just too agressive BIOS timings.

Linux is a bit more efficient wrt. DMA performance; this means
it puts a _lot_ more stress on memory and chipset. Is this
problem reproducible with less agressive BIOS timings?

| Linux memory management tour guide. |
| Scouting Vries cubscout leader. |

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at