Re: 2.1.89 broken?

Rik van Riel (H.H.vanRiel@fys.ruu.nl)
Wed, 11 Mar 1998 16:23:06 +0100 (MET)


On Wed, 11 Mar 1998, Scott Lampert wrote:

> I like that last idea, however I think the big problem is the
> amount of data the kernel transfers to swap at once - like megs and megs
> in one shot. The system freezes pretty hard during these massive swap
> phases.

1. the amount is transferred in chunks of SWAP_CLUSTER_MAX
2. the maximum amount of pages swapped out in one run is:

tries = free_pages_high - nr_free_pages;
if (tries < min_free_pages) {
tries = min_free_pages;
}
else if (nr_free_pages < (free_pages_high + free_pages_low) / 2) {
tries <<= 1;
if (nr_free_pages < free_pages_low) {
tries <<= 1;
if (nr_free_pages <= min_free_pages) {
tries <<= 1;
}
}
}

That is, under normal circumstances (nr_free_pages > free_pages_low)
kswapd will _try_ a maximum of (free_pages_high - nr_free_pages) * 4
times to free a page. Since kswapd automatically skips non-freeable
pages, this might be a bit to agressive, so I'll change this for the
next release.
(Linus, the patch is on it's way...)

Rik.
+-------------------------------------------+--------------------------+
| Linux: - LinuxHQ MM-patches page | Scouting webmaster |
| - kswapd ask-him & complain-to guy | Vries cubscout leader |
| http://www.fys.ruu.nl/~riel/ | <H.H.vanRiel@fys.ruu.nl> |
+-------------------------------------------+--------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu