------=_NextPart_000_0064_01BEDB37.982442B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Linus wrote:
> >Since flush_tlb_current_task() is now identical to
> >flush_tlb_mm(current->mm), I'd remove flush_tlb_current_task()
> >and change the macro for flush_tlb(). [in include/asm/pgtable.h]
> If you have the same code, then you have slow code. There's a
> fundamental difference between "flush current" and "flush an mm that
> may not exist on this CPU at all".
I don't know what you call "slow", but the number of IPI's and
local_flush_tlb() calls seems to be identical. (But all if-clauses
are reordered and different, so it's very confusing)
Btw, currently flush_tlb_mm() is not optimal:
If the function is called multiple times while in lazy-tlb mode, then
local_flush_tlb() is called every time. This is not needed:
while in lazy-tlb mode, no user-space pages are accessed,
i.e. the CPU cache cannot contain user-space entries, so there is
no need to flush it again.
(patch vs stock 2.3.12)
--
Manfred
------=_NextPart_000_0064_01BEDB37.982442B0
Content-Type: application/octet-stream;
name="smp.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="smp.c.diff"
--- smp.c.old Thu Jul 29 13:06:18 1999
+++ smp.c Sat Jul 31 08:54:36 1999
@@ -1652,10 +1652,11 @@
unsigned long vm_mask = 1 << current->processor;
unsigned long cpu_mask = mm->cpu_vm_mask & ~vm_mask;
- mm->cpu_vm_mask = 0;
- if (current->active_mm == mm) {
+ if (mm->cpu_vm_mask & vm_mask) {
mm->cpu_vm_mask = vm_mask;
local_flush_tlb();
+ } else {
+ mm->cpu_vm_mask = 0;
}
flush_tlb_others(cpu_mask);
}
------=_NextPart_000_0064_01BEDB37.982442B0--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/