3. did confuse me, too.  But I think the loop isn't wrong,
it just wastes time. When the walk function is called
for cpu N, the data we read in the loop for cpu
index != N is 0.

2009/4/16 Rafael Vanoni <Rafael.Vanoni at sun.com>:
> Li, Aubrey wrote:
> I agree with these first two, I need a little more time to properly check 3
> and 4. I'll get back to you as soon as possible.
>
> Thanks,
> Rafael
>
>> 3) I failed to understand why the current walk function need to go through
>> all CPU to get the dtrace time everytime to fill a per-cpu
>> array(g_cpu_power_states).
>> That might be the reason why duration < 0. So change to count the specific
>> cpu only.
>>
>> 4) if we have the condition check (dt_state_time >
>> cpu_pow->time_accounted), we also
>> need to check the opposite case. time_accounted should be reset if it's
>> not used by this
>> time.
>>
>> If the following patch makes sense, we'll have to fix the similar cstate
>> issue.

Reply via email to