lkml.org 
[lkml]   [2001]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subjectcalculation of ac_mem (in BSD accounting) misleading?
From
I'm interested in understanding better why the value of ac_mem in the
BSD process accounting code (linux/kernel/acct.c) is calculated the
way it is. My humble uninformed opinion is that it's current
definition is possibly misleading at best and mostly useless at worst.

As a little background:

The comment in include/linux/acct.h says ac_mem is "Average Memory
Usage".

According to BSD sources, ac_mem in BSD looks like a time-averaged
resident set size:

acct.ac_mem = (r->ru_ixrss + r->ru_idrss + r->ru_isrss) / t;
(http://minnie.tuhs.org/FreeBSD-srctree/newsrc/kern/kern_acct.c.html)

But the code in linux/kernel/acct.c indicates that ac_mem is simply the
vmsize (in KB) at the time acct_process() is called from do_exit(). It
does not appear to be an average, and IMHO, vmsize is nearly useless,
especially if one expects RSS.

Does it make sense to others that ac_mem should be changed to reflect
the resident set size?

Cheers,
Doug
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:54    [W:0.033 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site