Re: kswapd problem?

Rik van Riel (H.H.vanRiel@fys.ruu.nl)
Mon, 2 Mar 1998 18:53:02 +0100 (MET)


On Mon, 2 Mar 1998, Bill Hawes wrote:

> It seems like this could account for some of the reports of overly-aggressive
> swapping in 2.1.89-5. Have I missed something here, or is this the intended
> behavior?

It seems like you missed swap_tick()...

The 'overly agressive' kswapd only tries a maximum
of free_pages_high * 8 (assuming 0 free pages) calls
to try_to_free_page().

It's just that too many people have an extremely high
number of free_pages_high, since the old kswapd just
gave up too early when there were a lot of allocations...

I think a reduction of free_pages_high should help, kswapd
isn't really that agressive (unless somebody made my patch
even more agressive :-).

Furthermore, I think it would be enough for free_memory_available
to have:
- one free area of the largest memory order and
- the same amount of pages in order > 3 pages.

The following situations would all be valid:

size 32 64 128
---------------------------
0 0 2
0 2 1
2 1 1
4 0 1

This would be enough to allow allocation of all
(non-framegrabber) large memory allocations of
all device drivers.

I think I'll code it up right now, and submit it
to the list (and Linus) for testing later today.

Rik.
+-----------------------------+------------------------------+
| For Linux mm-patches, go to | "I'm busy managing memory.." |
| my homepage (via LinuxHQ). | H.H.vanRiel@fys.ruu.nl |
| ...submissions welcome... | http://www.fys.ruu.nl/~riel/ |
+-----------------------------+------------------------------+

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