lkml.org 
[lkml]   [1998]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectmore kswapd swap death ideas

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

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.285 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site