--- linux.base/kernel/sched.c Mon Jan 26 17:06:13 2004 +++ linux/kernel/sched.c Mon Jan 26 20:21:31 2004 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -1026,6 +1027,14 @@ wake_up_process(rq->migration_thread); wait_for_completion(&req.done); + /* + * we want a new context here. This eliminates TLB + * flushes on the cpus where the process executed prior to + * the migration. + */ + if (p == current) + flush_tlb_mm(current->mm); + /* If we raced with sys_sched_setaffinity, don't * restore mask. */ rq = task_rq_lock(p, &flags);