Re: [git pull] x86: fix global_flush_tlb() bug

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Linus Torvalds <torvalds@...>, Thomas Gleixner <tglx@...>, Greg KH <gregkh@...>, Chris Wright <chrisw@...>, Andi Kleen <andi@...>, Andrew Morton <akpm@...>, Jan Beulich <jbeulich@...>, <linux-kernel@...>
Date: Friday, October 19, 2007 - 8:05 am

Thanks for catching. 


global_flush_tlb() is not very common in the big scheme of things. In a normal
system it only happens single threaded during X server startup and when
the system starts.

So while it's nasty it's unlikely to really hit people in practice.

BTW while looking I noticed this code in the vermilion driver is also
surely not correct:

        /*
         * Change caching policy of the linear kernel map to avoid
         * mapping type conflicts with user-space mappings.
         * The first global_flush_tlb() is really only there to do a global
         * wbinvd().
         */

        global_flush_tlb();

That is not what gft is guaranteed to do.

It would be probably best to just do away with g_f_t() and fold it directly into
c_p_a(). I've seen little evidence the delayed flush optimization ever made 
much difference and it seems to be misused and a source of bugs. And near all
legitimate users seem to always call it directly after c_p_a() anyways.

Besides it is grossly misnamed -- it does much more than flushing TLBs.

-Andi
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git pull] x86: fix global_flush_tlb() bug, Ingo Molnar, (Fri Oct 19, 6:48 am)
Re: [git pull] x86: fix global_flush_tlb() bug, Andi Kleen, (Fri Oct 19, 8:05 am)