Eric Saxe wrote: > Hey Aubrey, > > Li, Aubrey wrote: >> It's different from P-state, I think. P-state will not change when >> we get P-state initial state To get the current idle state, CPU must >> be in C0. So if it's in C1, the obtaining changed it. So I think we >> can just ignore the initial gap. It is not bigger than 10ms. As for >> the default and reasonable sampling period, it's less than 0.2%. >> What do you think? ;-) > The idle state could be obtained by reading a kstat on a given > CPU...and that could be done without disturbing the CPU about which > the kstat is being published. The gap is no bigger than 10ms on the > clock > CPU, but on > other CPUs it could be much longer. >
err..., firstly, how about the clock CPU or uniprocessor system? do you want to calculate the gap or not? And, for other CPUs, how do you read their kstat from clock CPU? Thanks, -Aubrey
