public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* Fw: Re: Reduce TLB flushing during process migration
@ 2004-05-12 22:32 Andrew Morton
  2004-05-12 23:57 ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2004-05-12 22:32 UTC (permalink / raw)
  To: linux-arch; +Cc: steiner, mort, jbarnes


fyi, we're planning on pulling out the tlb_migrate_prepare() stuff
again - apparently it's not welcome on ia64 in its present form.

davem, you expressed interest in this previously.  The question is whether
we should remove the whole thing, or just the ia64 component?



Begin forwarded message:

Date: Wed, 12 May 2004 15:08:36 -0700
From: Andrew Morton <akpm@osdl.org>
To: davidm@hpl.hp.com
Cc: steiner@sgi.com, mort@wildopensource.com, jbarnes@sgi.com
Subject: Re: Reduce TLB flushing during process migration


David Mosberger <davidm@napali.hpl.hp.com> wrote:
>
> Please remove it until a proper solution exists.

I'll submit this on Friday, when bugalugs returns.


David Mosberger asked that this be backed out:

"I do not believe that flushing the TLB before migration is be the right thing
to do on ia64 machines which support global TLB purges (i.e., all but SGI's
machines)."

It was of huge benefit for the SGI machines, so work is ongoing.


---

 25-akpm/include/asm-generic/tlb.h |    2 --
 25-akpm/include/asm-ia64/tlb.h    |    2 --
 25-akpm/kernel/sched.c            |   10 ----------
 3 files changed, 14 deletions(-)

diff -puN include/asm-generic/tlb.h~revert-process-migration-speedup include/asm-generic/tlb.h
--- 25/include/asm-generic/tlb.h~revert-process-migration-speedup	Wed May 12 15:04:55 2004
+++ 25-akpm/include/asm-generic/tlb.h	Wed May 12 15:05:24 2004
@@ -146,6 +146,4 @@ static inline void tlb_remove_page(struc
 		__pmd_free_tlb(tlb, pmdp);			\
 	} while (0)
 
-#define tlb_migrate_prepare(mm) do { } while(0)
-
 #endif /* _ASM_GENERIC__TLB_H */
diff -puN include/asm-ia64/tlb.h~revert-process-migration-speedup include/asm-ia64/tlb.h
--- 25/include/asm-ia64/tlb.h~revert-process-migration-speedup	Wed May 12 15:04:55 2004
+++ 25-akpm/include/asm-ia64/tlb.h	Wed May 12 15:05:24 2004
@@ -211,8 +211,6 @@ __tlb_remove_tlb_entry (struct mmu_gathe
 	tlb->end_addr = address + PAGE_SIZE;
 }
 
-#define tlb_migrate_prepare(mm) flush_tlb_mm(mm)
-
 #define tlb_start_vma(tlb, vma)			do { } while (0)
 #define tlb_end_vma(tlb, vma)			do { } while (0)
 
diff -puN kernel/sched.c~revert-process-migration-speedup kernel/sched.c
--- 25/kernel/sched.c~revert-process-migration-speedup	Wed May 12 15:04:55 2004
+++ 25-akpm/kernel/sched.c	Wed May 12 15:05:24 2004
@@ -26,8 +26,6 @@
 #include <linux/highmem.h>
 #include <linux/smp_lock.h>
 #include <asm/mmu_context.h>
-#include <linux//pagemap.h>
-#include <asm/tlb.h>
 #include <linux/interrupt.h>
 #include <linux/completion.h>
 #include <linux/kernel_stat.h>
@@ -1302,14 +1300,6 @@ static void sched_migrate_task(task_t *p
 		wake_up_process(mt);
 		put_task_struct(mt);
 		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.
-		 */
-		tlb_migrate_prepare(current->mm);
-
 		return;
 	}
 out:

_

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fw: Re: Reduce TLB flushing during process migration
  2004-05-12 22:32 Fw: Re: Reduce TLB flushing during process migration Andrew Morton
@ 2004-05-12 23:57 ` David S. Miller
  2004-05-13  7:43   ` Andi Kleen
  0 siblings, 1 reply; 3+ messages in thread
From: David S. Miller @ 2004-05-12 23:57 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-arch, steiner, mort, jbarnes

On Wed, 12 May 2004 15:32:03 -0700
Andrew Morton <akpm@osdl.org> wrote:

> davem, you expressed interest in this previously.  The question is whether
> we should remove the whole thing, or just the ia64 component?

It doesn't do anything for me on sparc64.  As per the change
description, it's a benefit also on platforms like x86 where
context-switch == tlb flush anyways.

At least that was my understanding.

If it's beneficial to the ia64 folks, I'm ambivalent, so just
put the fixed version back in once available.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fw: Re: Reduce TLB flushing during process migration
  2004-05-12 23:57 ` David S. Miller
@ 2004-05-13  7:43   ` Andi Kleen
  0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2004-05-13  7:43 UTC (permalink / raw)
  To: David S. Miller; +Cc: Andrew Morton, linux-arch, steiner, mort, jbarnes

On Wed, May 12, 2004 at 04:57:06PM -0700, David S. Miller wrote:
> > davem, you expressed interest in this previously.  The question is whether
> > we should remove the whole thing, or just the ia64 component?
> 
> It doesn't do anything for me on sparc64.  As per the change
> description, it's a benefit also on platforms like x86 where
> context-switch == tlb flush anyways.

Hmm, are you sure? How would that help? 

-Andi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-13  7:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-12 22:32 Fw: Re: Reduce TLB flushing during process migration Andrew Morton
2004-05-12 23:57 ` David S. Miller
2004-05-13  7:43   ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox