voluntary-preempt-2.6.9-rc1-bk4-Q5
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Ingo Molnar
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Lee Revell
File under boot-time stuff, I guess. This could be bad if X crashes, but I can't remember the last time this happened to me, and I use xorg CVS.
Quoted 6 lines
Quoted 2 lines
but the first
wbinvd()withinprepare_set()seems completely unnecessary
- we can flush the cache after disabling the cache just fine.the third
wbinvd()inpost_set()seems unnecessary too - what kind of cache do we expect to flush, we've disabled caching in the CPU ... But the Intel pseudocode does it too - this is a thinko i think.
The multiple steps are needed, otherwise there can be problems with hyperthreading (the first x86-64 didn't do it in all cases, and it causes occassional problens with Intel CPUs)
Also repeated calls of this are relatively cheap because at the second time there is not much to flush anymore.
I would suggest to not do this change, it could cause very subtle problems.
-Andi
Quoted 7 lines · Andi Kleen
Quoted 3 lines
the third
wbinvd()inpost_set()seems unnecessary too - what kind of cache do we expect to flush, we've disabled caching in the CPU ... But the Intel pseudocode does it too - this is a thinko i think.The multiple steps are needed, otherwise there can be problems with hyperthreading (the first x86-64 didn't do it in all cases, and it causes occassional problens with Intel CPUs)
i'm quite sure the first one is unnecessary - any interrupt could already come inbetween and generate dirty cachelines, so it has zero guaranteed effect.
the third one _seems_ unnecessary - what dirty cachelines can there be after we've disabled the cache?
the hyperthreading question is valid but no way does the flush solve the HT problems this code already has! The only proper way i can see to _guarantee_ zero cache effects is to do a 'catch CPUs', 'disable IRQs, all caches and flush them', and 'set MTRR's on all CPUs', 'enable all caches', 'continue CPUs' sequence, SMP-synchronized at every point. Otherwise you can always get some dirty cache state due to HT races and whatever data corruption there might occur. I believe the MTRR code is quite incorrectly coded as-is.
Quoted 2 lines
Also repeated calls of this are relatively cheap because at the second time there is not much to flush anymore.
the trace shows that the first one is 300 usecs, the second and third one is 150 usecs each, so it's not exactly cheap.
Ingo
Quoted 3 lines · Ingo Molnar
The question is, does any of the Intel (or AMD) docs
say that the CPU cache has to be write-back flushed when setting MTRRs, or were those calls only done out of paranoia?
Both the Intel and AMD docs require the cache flush for MTRR caching attribute changes.
At least in pageattr (which is related) i know of cases where not doing them caused data corruption in real loads.
-Andi