From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266285AbUBQQWZ (ORCPT ); Tue, 17 Feb 2004 11:22:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266288AbUBQQWZ (ORCPT ); Tue, 17 Feb 2004 11:22:25 -0500 Received: from dbl.q-ag.de ([213.172.117.3]:28370 "EHLO dbl.q-ag.de") by vger.kernel.org with ESMTP id S266285AbUBQQWT (ORCPT ); Tue, 17 Feb 2004 11:22:19 -0500 Message-ID: <40323FB6.1030208@colorfullife.com> Date: Tue, 17 Feb 2004 17:22:14 +0100 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.4.1) Gecko/20031030 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Martin Hicks CC: linux-kernel@vger.kernel.org Subject: Re: [PATCH] Reduce TLB flushing during process migration Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Martin wrote: >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 > #include > #include >+#include > #include > #include > #include >@@ -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); >+ > > I think flush_tlb_mm() is the wrong function - e.g. for i386, it's a wasted flush, because i386 disconnects previous cpus from the tlb flush automatically. And it's always the wrong thing if you've migrated one thread of a task that runs on multiple cpus. I think you need a new hook. -- Manfred