DragonFly BSD
DragonFly kernel List (threaded) for 2010-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Approach to the RSS


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 20 Jun 2010 14:58:26 -0700 (PDT)

:The vm_map_entry points to the vm_object.
:The structure vm_object contains the reference count of the number of 
:vm_map_entry or other objects referencing it.
:Also, the vm_object structure has count of the number of resident pages.
:
:struct vm_object {
:....
:int ref_count;
:....
:int resident_page_count;
:....
:};
:
:Suppose their are 2 process, proc_A and proc_B. proc_A has three references to a 
:object and proc_B has 2.
:Thus, now their are five references and if we divide the resident_page_count by 
:ref_count, we can then multiply it by 3 to get/calculate proportional RSS for 
:proc_A and multiplying by 2 will give it for proc_B.
:Thus, we can get it without going very deep into the convoluted chain. And which 
:will be fast.
:
:
:If you guys think its a feasible solution, I can carry it and test it. After the 
:testing if the results are weird we can just move forward till the depth of the 
:chain.
:
:Thanks,
:Pratyush Kshirsagar.

    Hmm.  I don't think it is feasible as the vm_map_entry reference to
    the object references a page range within the object and not just a
    single page.  So you can't really determine the proportion.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



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