Re: Swap Attacks in 89-5

Rik van Riel (
Mon, 2 Mar 1998 18:35:08 +0100 (MET)

On Sun, 1 Mar 1998, Andrew Lewycky wrote:

> In the meanwhile, I'm going to weaken free_memory_available, and put
> the MAX_SWAP_FAIL counter back in, but maybe bump it up to around 12.

That won't work. The only effect of that will be that kswapd
will be woken up more often from swap_tick() (in mm/vmscan.c).

In fact, vmscan _can't_ have swapped out 24 megs at one time,
since the maximum number of tries to swap out a page on a 48
meg machine would be (96 - 0) * 8 = 768 pages = 3.5 mb (assuming
there is not one single free page :-).

The '24-megs-swapped-in-one-time' just means that kswap got
woken up quite a lot more than it should...

Maybe the page allocation algorithm (in mm/page_alloc.c) and
the free_memory_available() (in mm/memory.c??) should be fixed
until Ben's/Stephen's new VM layer is available.

| For Linux mm-patches, go to | "I'm busy managing memory.." |
| my homepage (via LinuxHQ). | |
| ...submissions welcome... | |

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