lkml.org 
[lkml]   [2004]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Reduce TLB flushing during process migration

Hi Andrew,

Another optimization patch from Jack Steiner, intended to reduce TLB
flushes during process migration.

CC'ed Rusty because this patch is applied on top of his cpuhotplug code.

This patch was generated against -rc4 with the rc3-mm1 patch merged on
top of it.

mh

--
Martin Hicks Wild Open Source Inc.
mort@wildopensource.com 613-266-2296
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1680 -> 1.1681
# kernel/sched.c 1.240 -> 1.241
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 04/02/17 mort@tomahawk.engr.sgi.com 1.1681
# Process migration optimization.
# --------------------------------------------
#
diff -Nru a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c Tue Feb 17 07:33:59 2004
+++ b/kernel/sched.c Tue Feb 17 07:33:59 2004
@@ -25,6 +25,7 @@
#include <linux/highmem.h>
#include <linux/smp_lock.h>
#include <asm/mmu_context.h>
+#include <asm/tlbflush.h>
#include <linux/interrupt.h>
#include <linux/completion.h>
#include <linux/kernel_stat.h>
@@ -1135,6 +1136,14 @@
task_rq_unlock(rq, &flags);
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.
+ */
+ flush_tlb_mm(current->mm);
+
return;
}
out:
\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.099 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site