more kswapd swap death ideas

George (greerga@nidhogg.ham.muohio.edu)
Mon, 22 Jun 1998 11:33:51 -0400 (EDT)


The first patch was more of a 'see if I can inspire someone more
experienced to think of a fix' type patch. Well, here's some other ideas
from an acknowledged kernel neophyte that should work better than the
previous one.

In do_try_to_free_page(), couldn't we do something like this:

case 2:
if (nr_swap_pages != 0)
if (swap_out(i, gfp_mask))
return 1;
state = 3;

Since we don't have swap left, nothing can get swapped out anyway. I don't
think shrink_dcache_memory() or shrink_mmap() swap to disk, but I don't
know if shm_swap() needs the same type of treatment (doesn't appear so at a
quick glance). This would at least prevent trying to swap out with no swap
left. Then perhaps get a out of memory signal later instead of deadlock
looking for more swap.

-George

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