Reduce TLB flushing during process migration
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 <[email protected]>
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Reduce TLB flushing during process migration
Quoted 2 lines · David Mosberger
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(-)
include/asm-generic/tlb.h renamed from include/asm-generic/tlb.h~revert-process-migration-speedup +0 -2
@@ -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 */
include/asm-ia64/tlb.h renamed from include/asm-ia64/tlb.h~revert-process-migration-speedup +0 -2
@@ -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)
kernel/sched.c renamed from kernel/sched.c~revert-process-migration-speedup +0 -10
@@ -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 *pwake_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:
_
Quoted 2 lines · On Wed, 12 May 2004 15:32:03 -0700 Andrew Morton <[email protected]> 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.
Quoted 6 lines · David S. Miller
Quoted 2 lines
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