patch-2.1.31 linux/kernel/fork.c
Next file: linux/kernel/info.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index
-  Lines: 18
-  Date:
Mon Mar 31 12:52:31 1997
-  Orig file: 
v2.1.30/linux/kernel/fork.c
-  Orig date: 
Sun Jan 26 03:40:46 1997
diff -u --recursive --new-file v2.1.30/linux/kernel/fork.c linux/kernel/fork.c
@@ -292,7 +292,16 @@
 	/* ok, now we should be set up.. */
 	p->swappable = 1;
 	p->exit_signal = clone_flags & CSIGNAL;
-	p->counter = current->counter >> 1;
+
+	/*
+	 * "share" dynamic priority between parent and child, thus the
+	 * total amount of dynamic priorities in the system doesnt change,
+	 * more scheduling fairness. This is only important in the first
+	 * timeslice, on the long run the scheduling behaviour is unchanged.
+	 */
+	current->counter >>= 1;
+	p->counter = current->counter;
+
 	if(p->pid) {
 		wake_up_process(p);		/* do this last, just in case */
 	} else {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov