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, 20 Sep 2011 10:06:25 -0300
From:	Glauber Costa <glommer@...allels.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	<linux-kernel@...r.kernel.org>, <xemul@...allels.com>,
	<paul@...lmenage.org>, <lizf@...fujitsu.com>,
	<daniel.lezcano@...e.fr>, <mingo@...e.hu>,
	<jbottomley@...allels.com>
Subject: Re: [PATCH 8/9] per-cgroup boot time

On 09/20/2011 10:04 AM, Peter Zijlstra wrote:
> On Tue, 2011-09-20 at 09:37 -0300, Glauber Costa wrote:
>
>>>> +	getboottime(&boottime);
>>>> +	ts = timespec_add(boottime, ca->start_time);
>>>> +	jif = ts.tv_sec;
>>>>
>>>>    	for_each_possible_cpu(i) {
>>>>    		cpustat = per_cpu_ptr(ca->cpustat, i);
>>>
>>>
>>> I'm confused, what does it do? You take a boot time timestamp at cgroup
>>> creation, add that to all boot-time readings and print the result. How
>>> does that make sense? Subtracting the start_time, maybe, that would make
>>> the cgroup creation time 0, adding, not so much.
>>
>> Boot time represent at which times the machine was booted. In this
>> context, at which time the container/cgroup was created. So it have to
>> be an addition.... don't really understand your question
>
> I think we're all properly confused now :-)
>
> getboottime() gives a time since boot, right?
>
> You take stamp at cgroup creation: say 50s after boot.
>
> Then on usage you take a new getboottime() reading (which per definition
> is>  50s) and add your 50s that you read previous. This results in the
> cgroup having 50s of boot-time _MORE_ than the machine. Say you read at
> 123s, you then add your 50s timestamp, resulting in 173s to report.
>
> If instead you did a subtraction: 123-50=73, you would have reported the
> time since cgroup creation.
>
no.

/**
  * getboottime - Return the real time of system boot.
  * @ts:         pointer to the timespec to be set
  *
  * Returns the wall-time of boot in a timespec.
...
--
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