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