--- mm/page_alloc.c.orig Thu Sep 21 20:02:54 2000 +++ mm/page_alloc.c Thu Sep 21 20:49:35 2000 @@ -295,6 +295,7 @@ int direct_reclaim = 0; unsigned int gfp_mask = zonelist->gfp_mask; struct page * page = NULL; + int try_again_loops = 0; /* * Allocations put pressure on the VM subsystem. @@ -320,8 +321,10 @@ /* * Are we low on inactive pages? */ - if (inactive_shortage() > inactive_target / 2 && free_shortage()) + if (inactive_shortage() > inactive_target / 2 && free_shortage()) { + printk("VM: inactive shortage wake kswapd\n"); wakeup_kswapd(0); + } try_again: /* @@ -410,6 +413,7 @@ * piece of free memory. */ if (order > 0 && (gfp_mask & __GFP_WAIT)) { + printk("VM: higher order"); zone = zonelist->zones; /* First, clean some dirty pages. */ page_launder(gfp_mask, 1); @@ -444,7 +448,9 @@ * processes, etc). */ if (gfp_mask & __GFP_WAIT) { - try_to_free_pages(gfp_mask); + int success = try_to_free_pages(gfp_mask); + printk("VM: try_to_free_pages (result: %d) try_again # %d\n", + success, ++try_again_loops); memory_pressure++; goto try_again; }