From: Tomas Hruby Date: Wed, 22 Sep 2010 08:01:36 +0000 (+0000) Subject: Remove unnecessary TLB flushes X-Git-Tag: v3.2.0~822 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.dnssec-settime.html?a=commitdiff_plain;h=2d1c8849d8eef83827c7f1fffa880d8256530df1;p=minix.git Remove unnecessary TLB flushes - this should be only for SMP --- diff --git a/kernel/arch/i386/klib.S b/kernel/arch/i386/klib.S index e7e7feb89..515ea5ea1 100644 --- a/kernel/arch/i386/klib.S +++ b/kernel/arch/i386/klib.S @@ -803,7 +803,7 @@ ENTRY(__switch_address_space) * test if the cr3 is loaded with the current value to avoid unnecessary * TLB flushes */ -#if 0 +#ifndef CONFIG_SMP mov %cr3, %ecx cmp %ecx, %eax je 0f diff --git a/kernel/proc.c b/kernel/proc.c index a3f339917..3f541b479 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -374,7 +374,9 @@ check_misc_flags: p->p_misc_flags &= ~MF_CONTEXT_SET; assert(!(p->p_misc_flags & MF_FULLVM) || p->p_seg.p_cr3 != 0); +#ifdef CONFIG_SMP refresh_tlb(); +#endif /* * restore_user_context() carries out the actual mode switch from kernel * to userspace. This function does not return