things related with /proc/<pid>/statm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone

recently, I take a closer look on Documentation/filesystems/proc.txt 
especially the section which explains about statm. I have several 
questions:

1. the description for trs field (field #4 from left) is "number of 
pages that are 'code' (not including libs; broken,  includes data 
segment)". What I don't understand is, why it is said also includes 
data segment? I check the related code on elf loader, probably because 
on code segment, not only .text section is mapped there, but also 
.rodata? or is there better explanation about it?

2. Similar with (1), drs field (field #6 from left) also said as broken 
and includes library text. I check task_statm() in fs/proc/task_mmu.c, 
this field is calculated like below:
*data = mm->total_vm - mm->shared_vm

My understanding is, total_vm is total virtual size of the process and 
shared_vm is pages backed by file. Thus, logically, the above formula 
is correctly showing the size of data segment (bss?). Any correction 
for my conclusion?

3.  Why dirty pages field (field #7 from left) is always shown in 2.6.x, 
while it shows number greater than 0 on 2.4.x. Dirty pages are not 
accounted in 2.6.x? Or is it expensive to track per process dirty pages 
on 2.6.x so it is dropped?

Thank you in advance for your help

regards

Mulyadi




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux