linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: yield during swap prefetching
@ 2006-03-07 23:13 Con Kolivas
  2006-03-07 23:26 ` Andrew Morton
  0 siblings, 1 reply; 43+ messages in thread
From: Con Kolivas @ 2006-03-07 23:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-mm, Andrew Morton, ck

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 <kernel@kolivas.org>
---
 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)
 			break;
+		yield();
 	}
 
 	if (sp_stat.prefetched_pages) {

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2006-03-17  9:06 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-07 23:13 [PATCH] mm: yield during swap prefetching Con Kolivas
2006-03-07 23:26 ` Andrew Morton
2006-03-07 23:32   ` Con Kolivas
2006-03-08  0:05     ` Andrew Morton
2006-03-08  0:51       ` Con Kolivas
2006-03-08  1:11         ` Andrew Morton
2006-03-08  1:12           ` Con Kolivas
2006-03-08  1:19             ` Con Kolivas
2006-03-08  1:23             ` Andrew Morton
2006-03-08  1:28               ` Con Kolivas
2006-03-08  2:08                 ` Lee Revell
2006-03-08  2:12                   ` Con Kolivas
2006-03-08  2:18                     ` Lee Revell
2006-03-08  2:22                       ` Con Kolivas
2006-03-08  2:27                         ` Lee Revell
2006-03-08  2:30                           ` Con Kolivas
2006-03-08  2:52                             ` [ck] " André Goddard Rosa
2006-03-08  3:03                               ` Lee Revell
2006-03-08  3:05                               ` Con Kolivas
2006-03-08 21:07                                 ` Zan Lynx
2006-03-08 23:00                                   ` Con Kolivas
2006-03-08 23:48                                     ` Zan Lynx
2006-03-09  0:07                                       ` Con Kolivas
2006-03-09  3:13                                         ` Zan Lynx
2006-03-09  4:08                                           ` Con Kolivas
2006-03-09  4:54                                             ` Lee Revell
2006-03-08  7:51                 ` Jan Knutar
2006-03-08  8:39                   ` Con Kolivas
2006-03-09  8:57             ` Helge Hafting
2006-03-09  9:08               ` Con Kolivas
2006-03-09 22:44                 ` Peter Williams
2006-03-10  9:01                   ` [ck] " Andreas Mohr
2006-03-10  9:11                     ` Con Kolivas
2006-03-10  0:58                 ` Peter Williams
2006-03-08 22:24       ` Pavel Machek
2006-03-09  2:22         ` Nick Piggin
2006-03-09  2:30           ` Con Kolivas
2006-03-09  2:57             ` Nick Piggin
2006-03-09  9:11               ` Con Kolivas
2006-03-08 13:36     ` [ck] " Con Kolivas
2006-03-17  9:06       ` Ingo Molnar
2006-03-08  8:48   ` Andreas Mohr
2006-03-08  8:52     ` Con Kolivas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox