Skip to contentSkip to conversation

mm: swap prefetch sched batch

PATCH New Con Kolivas 1 participant 1 message May 8, 2006 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: swap prefetch sched batch

kprefetchd is a latency insensitive ultra low priority task. Set it to SCHED_BATCH to obtain the benefit of this scheduling policy hint.

---
 mm/swap_prefetch.c |    3 +++
 1 files changed, 3 insertions(+)
mm/swap_prefetch.c +3 -0
Index: linux-2.6.17-rc3-mm1/mm/swap_prefetch.c
===================================================================
@@ -504,6 +504,9 @@ static enum trickle_return trickle_swap(
 
 static int kprefetchd(void *__unused)
 {
+	struct sched_param param = { .sched_priority = 0 };
+
+	sched_setscheduler(current, SCHED_BATCH, &param);
 	set_user_nice(current, 19);
 	/* Set ioprio to lowest if supported by i/o scheduler */
 	sys_ioprio_set(IOPRIO_WHO_PROCESS, 0, IOPRIO_CLASS_IDLE);
Signature · 1 line
-ck