Please apply this patch to resolve a little performance
problem with in-context swapouts... The fact that
run_task_queue(&tq_disk) isn't called is intentional.
We only free memory when we're low on memory and kswapd
will run soon anyway.
Not doing the sync means that we'll be holding the kernel
lock for a shorter period and that the process will get
it's memory quicker. It is _very_ likely that we will have
freed some clean pages anyway; only the pages on which we
need to do I/O are queued up for kswapd.
Maybe we need to wake up kswapd from here?
Rik.
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+
--- mm/page_alloc.c.orig Sat Jun 27 06:58:50 1998
+++ mm/page_alloc.c Sat Jun 27 07:00:35 1998
@@ -280,9 +280,9 @@
spin_unlock_irqrestore(&page_alloc_lock, flags);
if (!(gfp_mask & __GFP_WAIT))
break;
+ gfp_mask &= ~__GFP_WAIT; /* go through this only once */
if (!try_to_free_pages(gfp_mask, SWAP_CLUSTER_MAX))
break;
- gfp_mask &= ~__GFP_WAIT; /* go through this only once */
maxorder = NR_MEM_LISTS; /* Allow anything this time */
}
nopage:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu