Hi Linus, Here are the two patches I sent you earlier today, this time against 2.1.89-pre2. The kswapd logic is almost completely redone. Basically, kswapd tries (free_pages_high - nr_free_pages) times to free a page, but when memory becomes tighter, the number of tries become even higher. Since the code is compiling as I write, I don't know if the agression factor is right, but we can adjust that later... A nice sideeffect of this is, that when memory is being allocated slowly, kswapd will behave itself much better then when memory is allocated faster. In the latter case, kswapd will also become _far_ more agressive. It's kinda self-tuning, but just not yet :-) As for the other patch, it simply copies kswapd's page-aging behaviour for page cache (and swap cache) pages. Buffer pages, and possibly other ones, are still thrown out as soon as they're not used any more. OK... wait and see if it compiles : Yup, it compiles without a hitch (only mprotect.c gives a warning about an ambiguous else ... gcc-2.8.0). And since there's no new code in action, I leave the rebooting to you guys. 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/ | +-----------------------------+------------------------------+