This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Is it necessary to add _qs_update before qsq_utilization(and etc.)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]