Collect real process and processor utilization values when virtualization is enabled.

Jeff Scheel scheel at
Wed Jan 12 19:56:53 EST 2005

On Wed, 2005-01-12 at 02:36, 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).
I agree it doesn't sound like only collecting this data at context
switch does the trick.  If we hook the timer (say in the decr path),
then you need not have the code in context switch.  That is until you 
implement a tickless timer and decr goes away.

> Do we really need a struct to store one thing?  Are there other things
> you plan to add later?
It seems to me that if we tucked the last PURR aside on each decrementer
tick, we could simply let the kernel tasks which need this information
retrieve it as long as we can guarantee atomic update of the values from
the interrupt level.  Then, interfaces like /proc/ppc64/lparcfg can do
summing and other interfaces can use only the processor value if that's
all they need.  Given this, I'd vote for sticking the last PURR value
for a processor in sum per processor structure that exists today like
the Paca.  Thoughts?
Jeff Scheel (scheel at

More information about the Linuxppc64-dev mailing list