Re: [PATCH] Use global TLB flushes in MTRR code

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Andi Kleen <andi@...>, <davej@...>, <tglx@...>, <linux-kernel@...>, H. Peter Anvin <hpa@...>
Date: Saturday, February 9, 2008 - 10:12 am

> That would be a completely new and totally untested modus operandi for a 

I did -- that was the base I was working from.

BTW if you had read it closely you would have noticed that
the code as written currently violates the specification in a non trivial
way currently. If you worry so much about it that might be a good
area to investigate.


There are no global TLBs around during the MTRR change period because 
they have been all flushed just before. If any get prefetched they
will be in the TLB no matter if PGE is on or not.  That is because even
with PGE disabled TLBs are active. Then as soon as the MTRR changing
is done all TLBs (global or not) will be flushed.

[I admit I should have put that rationale into the original changelog,
then my thinking would have been clearer]


If there are any global TLBs around they will be flushed at the 
end (even two times) 

Anyways the only theoretical problem I could think of if there is some CPU
that does not flush all global TLBs on a global TLB flush, but if that
really happens the only sane thing we could on that CPU is to never
use global TLBs. But I'm not aware of any x86 CPU that broken around
(are you?)


Ok I cannot argue with you being so overly cautious. Caution
is a non exact heuristic that is hard to argue against.

I would appreciate though if you could clearly lay out which areas you
consider so risky that you think they cannot be changed anymore.

Does this cover all TLB flushes in general? Or only in some 
specific circumstances? If yes in which? 

Thanks.

That is just I can avoid stepping on your toes for those areas
for merely cleanups. They tend to be not important enough to warrant
a longer argument.


Yes, a whole ~10 bytes or so in two non duplicated functions :-) I like
the code size argument as well as the next guy, but if you use it 
for rounding errors like this it blunts.

-Andi

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

Messages in current thread:
[PATCH] Use global TLB flushes in MTRR code, Andi Kleen, (Thu Feb 7, 3:02 pm)
Re: [PATCH] Use global TLB flushes in MTRR code, Ingo Molnar, (Thu Feb 7, 3:13 pm)
Re: [PATCH] Use global TLB flushes in MTRR code, Andi Kleen, (Thu Feb 7, 4:03 pm)
Re: [PATCH] Use global TLB flushes in MTRR code, Ingo Molnar, (Thu Feb 7, 4:37 pm)
Re: [PATCH] Use global TLB flushes in MTRR code, Andi Kleen, (Fri Feb 8, 7:44 am)
Re: [PATCH] Use global TLB flushes in MTRR code, Ingo Molnar, (Sat Feb 9, 5:40 am)
Re: [PATCH] Use global TLB flushes in MTRR code, Andi Kleen, (Sat Feb 9, 7:48 am)
Re: [PATCH] Use global TLB flushes in MTRR code, Ingo Molnar, (Sat Feb 9, 7:47 am)
Re: [PATCH] Use global TLB flushes in MTRR code, Andi Kleen, (Sat Feb 9, 10:12 am)
Re: [PATCH] Use global TLB flushes in MTRR code, Oliver Pinter, (Thu Feb 7, 3:08 pm)