Date: Mon, 18 Jul 2022 12:30:59 +0530 From: Arka Sharma <arka.sw1988@gmail.com> To: freebsd-hackers@freebsd.org Subject: Private resident count in procstat(1) Message-ID: <CAPO=kN0CT1EJJ6JCzE_0N-edzX72fG4=k0EujiSPBWBpNmLrGA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--000000000000c79dbc05e40eee26 Content-Type: text/plain; charset="UTF-8" Hi All, I tracked the PRES field and observed that 'kve->kve_private_resident' is the count of vm_page contained by vm_object if the vm_map entry doesn't contain a shadow object. My question is why this field is called private resident as I understand the underlying vm_object will also contain pages which correspond to other map entries for the same process, and for shared mapping it could be referenced by map entries with other process as well. For the RES field my understanding is, it is the sum of pages of shadow objects and the tail of the object chain for the range of the given map entry and we also have 'ki_rssize' which is 'pm_stats.resident_count' plus the sum of kernel stack pages of the threads. Is there a situation the RES value will be greater than 'ki_rssize' ? Please correct me if above understanding is wrong. Regards, Arka --000000000000c79dbc05e40eee26 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi All,<div><br></div><div>I tracked the PRES field and ob= served that '<span style=3D"font-family:Consolas,"Courier New"= ;,monospace;font-size:14px;white-space:pre;color:rgb(0,16,128)">kve</span><= span style=3D"color:rgb(0,0,0);font-family:Consolas,"Courier New"= ,monospace;font-size:14px;white-space:pre">-></span><span style=3D"font-= family:Consolas,"Courier New",monospace;font-size:14px;white-spac= e:pre;color:rgb(0,16,128)">kve_private_resident</span>' is the count of= vm_page contained by vm_object if the vm_map entry doesn't contain a s= hadow object. My question is why this field is called private=C2=A0resident= as I understand the underlying vm_object will also contain pages which cor= respond to other map entries for the same process, and for shared mapping i= t could be referenced by map entries with other process as well.=C2=A0</div= ><div><br></div><div>For the RES field my understanding is, it is the sum o= f pages of shadow objects and the tail of the object chain for the range of= the given map entry and we also have '<span style=3D"color:rgb(0,16,12= 8);font-family:Consolas,"Courier New",monospace;font-size:14px;wh= ite-space:pre">ki_rssize</span>' which is '<span style=3D"font-fami= ly:Consolas,"Courier New",monospace;font-size:14px;white-space:pr= e;color:rgb(0,16,128)">pm_stats</span><span style=3D"font-family:Consolas,&= quot;Courier New",monospace;font-size:14px;white-space:pre;color:rgb(0= ,0,255)">.</span><span style=3D"font-family:Consolas,"Courier New"= ;,monospace;font-size:14px;white-space:pre;color:rgb(0,16,128)">resident_co= unt</span>' plus the sum of kernel stack pages of the threads. Is there= a situation the RES value will be greater than '<span style=3D"color:r= gb(0,16,128);font-family:Consolas,"Courier New",monospace;font-si= ze:14px;white-space:pre">ki_rssize</span>' ?</div><div><br></div><div>P= lease correct me if above understanding is wrong.</div><div><br></div><div>= Regards,</div><div>Arka</div></div> --000000000000c79dbc05e40eee26--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPO=kN0CT1EJJ6JCzE_0N-edzX72fG4=k0EujiSPBWBpNmLrGA>