[lkml]   [2001]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectcalculation of ac_mem (in BSD accounting) misleading?
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

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;

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?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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