[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <45422A94.1040402@watson.ibm.com>
Date: Fri, 27 Oct 2006 11:49:40 -0400
From: Shailabh Nagar <nagar@...son.ibm.com>
To: David Rientjes <rientjes@...washington.edu>
CC: Martin Tostrup Setek <martitse@...dent.matnat.uio.no>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH: 2.6.18.1] delayacct: cpu_count in taskstats updated correctly
David Rientjes wrote:
> On Fri, 27 Oct 2006, Martin Tostrup Setek wrote:
>
>> from: Martin T. Setek <martitse@....uio.no>
>>
>> cpu_count in struct taskstats should be the same as the corresponding (third)
>> value found in /proc/<pid>/schedstat
>
> I disagree in favor of Documentation/accounting/taskstats-struct.txt.
> cpu_count is the number of delay values recorded, so accumulating them is
> appropriate.
>
> David
David's right. The delay accounting field cpu_count
is measuring how many delay values are recorded in the field cpu_delay_total
(so that one can divide one by the other to get an average if needed).
For the delays reported for a single task (ie. __delayacct_add_tsk called only
once for a given task), the effect will be what Martin wants i.e. cpu_count will be
the same as /proc/pid/schedstat's third field (sched_info->pcnt)
But when the delays are reported for a tgid, where *accumalation* of delays for
all constituent pids is being done (by calling __delayacct_add_tsk repeatedly), what
is desired is to accumalate both cpu_count and cpu_delay_total.
So the patch proposed by Martin is incorrect.
--Shailabh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists