-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 With all the recent attention paid to swap I thought I'd resync this patch with 2.6.7-rc2 in it's more recent incarnation. What this patch does is this: The swappiness is made proportional to the amount of ram consumed by application pages, and inversely proportional to the amount of the last (sizeof physical ram) of swap ram used up. This has the effect of hardly ever using swap if you have large amounts of cached data by say copying an iso image or manipulating video files. Conversely if you have lots of applications running at once it will allow the less used ones to swap out by increasing the swappiness, giving preference to the "foreground" one. Changes from the first version announced on lkml: Amount of swap space consumed is also taken into account, and the size of it compared to the physical ram is taken into consideration when making it's effect on the value of swappiness. With this patch, this should make any machine that has swapspace as resistant to OOM as possible. This version by default autoregulates the swappiness, but also allows you to choose a manual setting if you so desire by echo 0 > /proc/sys/vm/autoswappiness and then setting the swappiness the manual way as previously. This makes comparison with autoregulation easy. A few bugfixes. Con -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAueIEZUg7+tp6mRURAnx5AJ9bkBsu+nAxT3fXJe2qLQ3PSYVL7wCbBrrC pZOZHLOBhVsVdrd1a1ozKS4= =XeIZ -----END PGP SIGNATURE-----