This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Is it necessary to add _qs_update before qsq_utilization(and etc.)
- From: "Zhaolei" <zhaolei at cn dot fujitsu dot com>
- To: <systemtap at sourceware dot org>
- Cc: "Zhaolei" <zhaolei at cn dot fujitsu dot com>
- Date: Tue, 9 Oct 2007 16:51:05 +0900
- Subject: Is it necessary to add _qs_update before qsq_utilization(and etc.)
- References: <470B0D2A.4070401@cn.fujitsu.com>
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