From: William C. <wc...@nc...> - 2002-10-01 16:14:48
|
The P4 HT duplicates the user register and some interrupt handling registers. Much of the hardware between the logical processors is shared, e.g. the performance monitoring hardware. This means that performance event setting on one logical processor will affect the event set on the other logical processor on the die. The code that sets up the perfmon hardware will need to realize that shared between pairs of processors. Another significant problem is attributing the event sample to the correct thread. There are two basic classes of performance monitoring event on the P4: Thread Specific (TS) and Thread Independent (TI). For TS events a performance counter can be set to monitor one logical processor or the other (or both). For TI events, e.g. instruction decoding, counts from both threads are lumped together. This means for TI events that another thread can significantly affect the measurements. I was hoping that we could dupicate the performance monitoring events in other half of the performance registers on the P4 and effectively monitor both logical threads. However, the way that the registers are set up this does not seem to be possible. perfctr has similar problems with the P4 HT hardware. -will John Levon wrote: > On Tue, Oct 01, 2002 at 11:17:56AM -0400, William Cohen wrote: > > >>Here is my first pass at testing to determine whether the p4 is running >>in HT and to avoid using the performance monitoring hardware if that is >>the case. The code has been tried on non-HT and HT p4 processors. > > > OK. What needs to be done to support HT ? > > regards > john > |