login
Header Space

 
 

scheduler_wait_hook

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Date: Thursday, October 6, 2005 - 3:24 am

hi,

currently, scheduler_fork_hook copies parent's p_estcpu to child.
and scheduler_wait_hook adds it back to the parent.
it effectively doubles parent's p_estcpu and make some applications
(eg. my login script ;-) unreasonablly slow on cpu-loaded machines.

if no one objects, i'll commit the following patch.

YAMAMOTO Takashi

Index: kern/kern_synch.c
===================================================================
--- kern/kern_synch.c	(revision 1390)
+++ kern/kern_synch.c	(working copy)
@@ -1215,7 +1215,9 @@ scheduler_wait_hook(struct proc *parent,
 {
 
 	/* XXX Only if parent != init?? */
-	parent->p_estcpu = ESTCPULIM(parent->p_estcpu + child->p_estcpu);
+	if (parent->p_estcpu < child->p_estcpu) {
+		parent->p_estcpu = child->p_estcpu;
+	}
 }
 
 /*
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
scheduler_wait_hook, YAMAMOTO Takashi, (Thu Oct 6, 3:24 am)
Re: scheduler_wait_hook, David Laight, (Thu Oct 6, 4:15 pm)
Re: scheduler_wait_hook, YAMAMOTO Takashi, (Thu Oct 6, 8:51 pm)
Re: scheduler_wait_hook, der Mouse, (Thu Oct 6, 4:19 pm)
Re: scheduler_wait_hook, Allen Briggs, (Thu Oct 6, 1:44 pm)
Re: scheduler_wait_hook, YAMAMOTO Takashi, (Thu Oct 6, 8:51 pm)
Re: scheduler_wait_hook, Jason Thorpe, (Thu Oct 6, 3:04 pm)
Re: scheduler_wait_hook, YAMAMOTO Takashi, (Thu Oct 6, 8:52 pm)
Re: scheduler_wait_hook, Jason Thorpe, (Fri Oct 7, 11:44 am)
Re: scheduler_wait_hook, YAMAMOTO Takashi, (Sun Nov 6, 6:01 am)
Re: scheduler_wait_hook, YAMAMOTO Takashi, (Sun Dec 18, 2:00 am)
Re: scheduler_wait_hook, Ignatios Souvatzis, (Fri Oct 7, 5:24 am)
Re: scheduler_wait_hook, YAMAMOTO Takashi, (Tue Nov 1, 5:59 pm)
speck-geostationary