lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Oct 2006 22:51:12 -0700 (PDT)
From:	David Rientjes <rientjes@...washington.edu>
To:	Martin Tostrup Setek <martitse@...dent.matnat.uio.no>
cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH: 2.6.18.1] delayacct: cpu_count in taskstats updated
 correctly

On Fri, 27 Oct 2006, Martin Tostrup Setek wrote:

> In include/linux/taskstats.h, I found:
> 
>          * xxx_count is the number of delay values recorded
>          * xxx_delay_total is the corresponding cumulative delay in
>          nanoseconds
> 
> I interpret these comments as saying that:
> 
> cpu_delay should be the total number of nanoseconds a task has been waiting in
> a runqueue for a CPU, and cpu_count is equal to the number of times the task
> got the CPU (or waited for it). If so, then the code updates
> taskstats.cpu_delay_total incorrectly too (which my patch didn't fix).
> 

I don't see a cpu_delay, I see a cpu_delay_total.  This is the CPU's
cumulative delay and is only accessible through the user-space accounting 
program Documentation/accounting/getdelays.c.  It reports the number of 
delay values recorded and the real total, virtual total, and delay total; 
each of these are cumulative.

In the use case for cpu_count, taking the difference of two successive 
cpu_count readings as reported by getdelays.c would find the number of 
delays experienced in that interval.  This is described in the program's 
documentation so by definition the count must be cumulative.  It is also 
possible to find the average delay but dividing cpu_delay_total by 
cpu_count.

The original code is correct and accumulation is appropriate.

		David
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ