From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14557 invoked by alias); 9 Oct 2007 07:51:13 -0000 Received: (qmail 14547 invoked by uid 22791); 9 Oct 2007 07:51:12 -0000 X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL,BAYES_50,DK_POLICY_SIGNSOME,DNS_FROM_RFC_ABUSE X-Spam-Check-By: sourceware.org Received: from fgwmail5.fujitsu.co.jp (HELO fgwmail5.fujitsu.co.jp) (192.51.44.35) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Oct 2007 07:51:09 +0000 Received: from m2.gw.fujitsu.co.jp ([10.0.50.72]) by fgwmail5.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id l997p6ak008516 for (envelope-from zhaolei@cn.fujitsu.com); Tue, 9 Oct 2007 16:51:06 +0900 Received: from smail (m2 [127.0.0.1]) by outgoing.m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 248F11B801E for ; Tue, 9 Oct 2007 16:51:06 +0900 (JST) Received: from s10.gw.fujitsu.co.jp (s10.gw.fujitsu.co.jp [10.0.50.80]) by m2.gw.fujitsu.co.jp (Postfix) with ESMTP id F14422DC048 for ; Tue, 9 Oct 2007 16:51:05 +0900 (JST) Received: from s10.gw.fujitsu.co.jp (s10 [127.0.0.1]) by s10.gw.fujitsu.co.jp (Postfix) with ESMTP id CB969161C00A for ; Tue, 9 Oct 2007 16:51:05 +0900 (JST) Received: from vs00.gw.fujitsu.co.jp (vs00.gw.fujitsu.co.jp [133.161.11.20]) by s10.gw.fujitsu.co.jp (Postfix) with ESMTP id E3708161C014 for ; Tue, 9 Oct 2007 16:51:04 +0900 (JST) Received: from root01.fujitsu.com (root01.fujitsu.com [133.161.11.11]) by vs00.gw.fujitsu.co.jp (8.13.7/8.13.7) with ESMTP id l997p4RF027107 for ; Tue, 9 Oct 2007 16:51:04 +0900 Received: from root01.fujitsu.com (root01 [127.0.0.1]) by root01.fujitsu.com (Postfix) with ESMTP id 9E93B282C6E; Tue, 9 Oct 2007 16:51:04 +0900 (JST) Received: from guest004 (unknown [10.124.105.133]) by root01.fujitsu.com (Postfix) with SMTP id 42BCB282C6B; Tue, 9 Oct 2007 16:51:04 +0900 (JST) Message-ID: <13bd01c80a49$25aaa590$85697c0a@guest004> From: "Zhaolei" To: Cc: "Zhaolei" References: <470B0D2A.4070401@cn.fujitsu.com> Subject: Is it necessary to add _qs_update before qsq_utilization(and etc.) Date: Tue, 09 Oct 2007 07:51:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2007-q4/txt/msg00094.txt.bz2 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