[lkml]   [2006]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] mm: yield during swap prefetching
Swap prefetching doesn't use very much cpu but spends a lot of time waiting on 
disk in uninterruptible sleep. This means it won't get preempted often even at
a low nice level since it is seen as sleeping most of the time. We want to
minimise its cpu impact so yield where possible.

Signed-off-by: Con Kolivas <>
mm/swap_prefetch.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6.15-ck5/mm/swap_prefetch.c
--- linux-2.6.15-ck5.orig/mm/swap_prefetch.c 2006-03-02 14:00:46.000000000 +1100
+++ linux-2.6.15-ck5/mm/swap_prefetch.c 2006-03-08 08:49:32.000000000 +1100
@@ -421,6 +421,7 @@ static enum trickle_return trickle_swap(

if (trickle_swap_cache_async(swp_entry, node) == TRICKLE_DELAY)
+ yield();

if (sp_stat.prefetched_pages) {
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2006-03-08 00:15    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean