patch-1.3.99 linux/kernel/sched.c

Next file: linux/mm/filemap.c
Previous file: linux/kernel/module.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.98/linux/kernel/sched.c linux/kernel/sched.c
@@ -121,8 +121,7 @@
 	init_task.prev_run = p;
 #ifdef __SMP__
 	/* this is safe only if called with cli()*/
-	while(set_bit(31,&smp_process_available));
-#if 0	
+	while(set_bit(31,&smp_process_available))
 	{
 		while(test_bit(31,&smp_process_available))
 		{
@@ -133,7 +132,6 @@
 			}
 		}
 	}
-#endif	
 	smp_process_available++;
 	clear_bit(31,&smp_process_available);
 	if ((0!=p->pid) && smp_threads_ready)
@@ -242,6 +240,11 @@
 	/* We are not permitted to run a task someone else is running */
 	if (p->processor != NO_PROC_ID)
 		return -1000;
+#ifdef PAST_2_0		
+	/* This process is locked to a processor group */
+	if (p->processor_mask && !(p->processor_mask & (1<<this_cpu))
+		return -1000;
+#endif		
 #endif
 
 	/*
@@ -340,7 +343,7 @@
 	 *	This is safe as we do not permit re-entry of schedule()
 	 */
 	prev->processor = NO_PROC_ID;
-#define idle_task (task[this_cpu])
+#define idle_task (task[cpu_number_map[this_cpu]])
 #else
 #define idle_task (&init_task)
 #endif	

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this