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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 07 Aug 2006 18:49:58 -0700
From:	Jay Lan <jlan@....com>
To:	Andrew Morton <akpm@...l.org>
Cc:	Jay Lan <jlan@...r.sgi.com>, linux-kernel@...r.kernel.org,
	nagar@...son.ibm.com, balbir@...ibm.com, jes@....com,
	csturtiv@....com, tee@....com, guillaume.thouvenin@...l.net
Subject: Re: [patch 3/3] convert CONFIG tag for extended accounting routines

Jay Lan wrote:
> Andrew Morton wrote:
> 

[snip]

>>
>>> +        if (delta == 0)
>>> +            return;
>>> +        tsk->acct_stimexpd = tsk->stime;
>>> +        tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm);
>>> +        tsk->acct_vm_mem1 += delta * tsk->mm->total_vm;
>>
>>
>>
>> It's a bit weird to be multiplying RSS by time.  What unit is a "byte
>> second"?
>>
>> If this is not a bug then I guess this is an intermediate term for
>> additional downstream processing.  There is information loss here and I'd
>> have thought that it would be better to simply send `delta' and the rss
>> straight to userspace, let userspace work out what math it wants to 
>> perform
>> on it.  If that makes sense?
>>
>> I see that the code has been like this for a long time, so treat this 
>> as a
>> "please educate me about BSD accounting" email ;)
> 
> 
> This is not a BSD accounting thing. It came from UNICOS and IRIX.
> I am pinging the person who knows how the real world users use these
> two fields...

Andrew,

Here is the explanation i owe you.

We accumulated the RSS/VM value at each timer interrupt update in terms
of pages-tick. At userland, the value is divided by tsk->stime (in usec)
to gain average usage of RSS/VM.

I need to do a little bit more processing in the kernel to convert
the pages-tick values to Mbytes-usec unit before delivery to userland
since the calculation are platform dependent. I will include the
change in the upcoming update patch.

Regards,
  - jay


> 
> Regards,
>  - jay
> 
>>
> 
> 

-
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