Collect real process and processor utilization values when virtualization is enabled.
Manish Ahuja
ahuja at austin.ibm.com
Thu Jan 13 03:30:21 EST 2005
Paul Mackerras wrote:
>
>Don't you also need to update purr_data_array in timer_interrupt as
>well? You seem to be doing that only on context switch, which won't
>be updated in a timely fashion necessarily (think of a compute-bound
>task on a lightly-loaded machine).
>
>
>
Yes, I do need to add this in other places to improve the collection times.
I have stepped away from using the old system completely and would
actually like to add more collection points
in interrupt routines. This will also enable me to collect real system
time and other data which i plan to use at other places.
I held that piece back since I saw what martin and john have been doing.
Will put a more cohesive patch out. But this bit will remain unchanged
with the other additions.
>>+ for_each_cpu(cpu)
>>+ cus = &per_cpu(purr_data_array, cpu);
>>+ sum_purr += cus->current_purr;
>>+ }
>>
>>
>
>The spacing is wrong here, it should be "for_each_cpu(cpu) {" and the
>"}" should be one tab to the left of where it is.
>
>
>
Wilco .. will fix it ..
>>+/* Used to store Processor Utilization register (purr) values */
>>+DECLARE_PER_CPU(struct purr_data, purr_data_array);
>>+
>>+struct purr_data {
>>+ u64 current_purr; /* Holds the current purr register values */
>>+};
>>
>>
>
>Do we really need a struct to store one thing? Are there other things
>you plan to add later?
>
>
>
In my prototype there are a few more things. But since the other patch
is not final, I only added the one thing, that I knew for sure I wanted.
Having other members and not using them, generally gets you knocked on
the head... so...
I definitely plan to add other things..
Manish
More information about the Linuxppc64-dev
mailing list