Skip to contentSkip to conversation

sched: dont renice kernel threads

PATCH In review Con Kolivas 2 participants 3 messages Mar 16, 2007 Workqueue

lore
Share & tools
lore
#0 lore raw

PATCH 4/6 sched: dont renice kernel threads

The practice of renicing kernel threads to negative nice values is of questionable benefit at best, and at worst leads to larger latencies when kernel threads are busy on behalf of other tasks.

---
 kernel/workqueue.c |    1 -
 1 file changed, 1 deletion(-)
kernel/workqueue.c +0 -1
Index: linux-2.6.21-rc3-mm2/kernel/workqueue.c
===================================================================
@@ -294,7 +294,6 @@ static int worker_thread(void *__cwq)
 	if (!cwq->wq->freezeable)
 		current->flags |= PF_NOFREEZE;
 
-	set_user_nice(current, -5);
 	/*
 	 * We inherited MPOL_INTERLEAVE from the booting kernel.
 	 * Set MPOL_DEFAULT to insure node local allocations.
Signature · 1 line
-ck
#1 lore raw
Quoted 3 lines · Con Kolivas

The practice of renicing kernel threads to negative nice values is of questionable benefit at best, and at worst leads to larger latencies when kernel threads are busy on behalf of other tasks.

What about the priority implications of the renicing? It seems a bit iffy letting kernel threads compete for cpu time on an equal basis with your default shell.

Chris

#2 lore raw
Quoted 8 lines · Chris Friesen
Quoted 3 lines · Con Kolivas

The practice of renicing kernel threads to negative nice values is of questionable benefit at best, and at worst leads to larger latencies when kernel threads are busy on behalf of other tasks.

What about the priority implications of the renicing? It seems a bit iffy letting kernel threads compete for cpu time on an equal basis with your default shell.

Lots of things we do because we just assume they're a good idea without any evidence. Renicing kernel threads was always considered a good idea on this basis. I'm certain noone has ever proven that it's a good thing though. Either way, the latest version of rsdl is robust enough that it works fine with reniced kernel threads if you still believe that's advantageous. This is definitely open for discussion/opinion.

Signature · 1 line
-ck