lkml.org 
[lkml]   [2000]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] i386 tlb flush bug fix
From
Date
Manfred <manfred@colorfullife.com> writes:
> I found a tlb flush race in switch_mm:
>
> If
> * the cpu is in lazy tlb mode
> * it perform a thread switch without changing active_mm.
> * a flush ipi arrives while the cpu is in switch_mm, after the
> set_bit(cpu_vm_mask), but before setting cpu_tlbstate[].state.
>
> then the cpu will miss all tlb flush ipis until the next reschedule.

Yes, this is it. This morning I tried changing the tlbstate accesses
in switch_mm() to use xchg(), to make them atomic w.r.t. the flush
ipi, and it fixed the problem.

But getting rid of the OLD state completely seems like a neater
solution.

>
> My first bugfix left a tiny race, below is a new bugfix.
>
> I've tested it on my Dual-pII, but I don't have any special multi threaded
> test apps.
>
> Please test it!

I'll try it this evening and let you know how it goes. Thanks for
looking at the problem.


David Wragg

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.034 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site