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:	Tue, 01 May 2007 23:22:03 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	menage@...gle.com
CC:	akpm@...ux-foundation.org, dev@...ru, xemul@...ru,
	serue@...ibm.com, vatsa@...ibm.com, ebiederm@...ssion.com,
	haveblue@...ibm.com, svaidy@...ux.vnet.ibm.com, balbir@...ibm.com,
	pj@....com, ckrm-tech@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, rohitseth@...gle.com,
	mbligh@...gle.com, containers@...ts.osdl.org, devel@...nvz.org
Subject: Re: [PATCH 2/9] Containers (V9): Example CPU accounting subsystem

menage@...gle.com wrote:
> +
> +/* Lazily update the load calculation if necessary. Called with ca locked */
> +static void cpuusage_update(struct cpuacct *ca)
> +{
> +	u64 now = get_jiffies_64();
> +	/* If we're not due for an update, return */
> +	if (ca->next_interval_check > now)
> +		return;
> +
> +	if (ca->next_interval_check <= (now - INTERVAL)) {

These two conditions seem a little confusing.

If ca->next_interval_check > (now - INTERVAL), the else part
is executed, but if ca->next_interval_check > (now - INTERVAL)
then ca->next_interval_check > now, which implies we return
and never enter the else part. It's been quite sometime since
I looked at this code, so I might have gotten it wrong.
I see a load of 0% on my powerpc box. I think it is because
last_interval_time is always 0, I'll debug further


-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
-
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