lkml.org 
[lkml]   [2004]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectInconsistancies in /proc (status vs statm) leading to wrong documentation (proc.txt)
Hi,

I'm currently trying use mlockall for a soft RT application and was
concerned by the memory usage of my (big) RT process. So I stated to
look at /proc/<PID>/status and /proc/<PID>/statm and then to the
documentation of statm (Documentation/filesystem/proc.txt) because
unexplained values are rather useless.

The doc currently says :
-------------------------------------------------------------------------
Field Content
size total program size (pages) (same as VmSize in status)
resident size of memory portions (pages) (same as VmRSS in status)
shared number of pages that are shared (i.e. backed by a file)
trs number of pages that are 'code' (not including libs; broken,
includes data segment)
lrs number of pages of library (always 0 on 2.6)
drs number of pages of data/stack (including libs; broken,
includes library text)
dt number of dirty pages (always 0 on 2.6)
---------------------------------------------------------------------------

But when I did cat /proc/<pid>/status and /proc/<pid>/statm the result
where rather different (and not only due to size units). Looking at
/usr/src/linux/fs/proc/task_mmu.c It is not surpising.

May I suggest :
- To use consistent memory size units between status and statm,
- To have VmSize and statm return the same global memory size,
- To eventually display mm->reserved_vm in status and put a word about
it in the doc,

Of course I can send a patch but I would rather let you decide the way
you want to go...


Thanks,

--
__
/ ` Eric Valette
/-- __ o _. 6 rue Paul Le Flem
(___, / (_(_(__ 35740 Pace

Tel: +33 (0)2 99 85 26 76 Fax: +33 (0)2 99 85 26 76
E-mail: eric.valette@free.fr



-
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 14:06    [W:0.070 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site