rusage: Add comment on counting COW-source pointed-to by only fileobj
Change-Id: I082f6738dd29257c05e8a0e4b0af23dd8ffab449
This commit is contained in:
@@ -2013,9 +2013,16 @@ retry:
|
||||
__FUNCTION__, virt, phys_to_virt(phys), virt_to_phys(virt), phys, pgsize);
|
||||
memcpy(virt, phys_to_virt(phys), pgsize);
|
||||
|
||||
/* Call rusage_memory_stat_add() because remote page fault may create a page not pointed-to by PTE */
|
||||
if(rusage_memory_stat_add(range, phys, pgsize, pgsize)) {
|
||||
dkprintf("%lx+,%s: remote page fault + cow, calling memory_stat_rss_add(),pgsize=%ld\n",
|
||||
/* Count COW-source pointed-to by only fileobj
|
||||
* The steps in test/rusage/005:
|
||||
* (1) Private-map regular file
|
||||
* (2) Don't touch the page
|
||||
* (3) Fork and then the child touches the page
|
||||
* (4) Page-in the COW-source
|
||||
* (5) Reach here
|
||||
*/
|
||||
if (rusage_memory_stat_add(range, phys, pgsize, pgsize)) {
|
||||
dkprintf("%lx+,%s: COW-source pointed-to by only fileobj, calling memory_stat_rss_add(),pgsize=%ld\n",
|
||||
phys, __FUNCTION__, pgsize);
|
||||
}
|
||||
if (page) {
|
||||
|
||||
Reference in New Issue
Block a user