Is it necessary to add _qs_update before qsq_utilization(and etc.)
Zhaolei
zhaolei@cn.fujitsu.com
Tue Oct 9 07:51:00 GMT 2007
Hi, everyone
There are various query functions in queue_stats.stp such as
qsq_utilization, qsq_blocked, and etc.
Only when request-change occurs, i.e. when one of qs_wait, qs_run and
qs_done is called, the variable for timing is updated by _qs_update.
It is not accurate enough, because when the functions are called in the
following sequence:
| qs_run() ---------> point1
| ...
| qsq_utilization() ---------> point2
qs_rtime in qsq_utilization will be the total running time from point1 to
the last qsq_start(), but not from point2 to the last qsq_start() as
expected.
To make it more accurate, I think _qs_update is need to be added to the
beginning of all query functions such as qsq_utilization, qsq_blocked,
etc.
function qsq_utilization (qname, scale) {
+ _qs_update(qname)
elapsed = qs_time() - qs_stime[qname]
return (scale * qs_rtime[qname]) / elapsed
}
If no objection, I will commit it.
Regards
Zhaolei
More information about the Systemtap
mailing list