diff -Naurp -X /home/jbarnes/dontdiff 230-tlb-global-flush-fix.patch/kernel/sched.c 240-node-history-migration.patch/kernel/sched.c --- 230-tlb-global-flush-fix.patch/kernel/sched.c Thu Jan 29 10:18:58 2004 +++ 240-node-history-migration.patch/kernel/sched.c Thu Jan 29 10:34:39 2004 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -1154,6 +1155,14 @@ static void sched_migrate_task(task_t *p 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);