mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-06 09:17:25 +00:00
Include altkstack pages in the RSS regardless of whether the process
is swapped out. Pointed out by jhb.
This commit is contained in:
parent
e2527daf1a
commit
913fc94d2b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113993
@ -662,15 +662,13 @@ fill_kinfo_proc(p, kp)
|
||||
|
||||
kp->ki_size = vm->vm_map.size;
|
||||
kp->ki_rssize = vmspace_resident_count(vm); /*XXX*/
|
||||
if (p->p_sflag & PS_INMEM) {
|
||||
if (p->p_sflag & PS_INMEM)
|
||||
kp->ki_rssize += UAREA_PAGES;
|
||||
FOREACH_THREAD_IN_PROC(p, td0) {
|
||||
if (!TD_IS_SWAPPED(td0))
|
||||
kp->ki_rssize += td0->td_kstack_pages;
|
||||
if (td0->td_altkstack_obj != NULL)
|
||||
kp->ki_rssize +=
|
||||
td0->td_altkstack_pages;
|
||||
}
|
||||
FOREACH_THREAD_IN_PROC(p, td0) {
|
||||
if (!TD_IS_SWAPPED(td0))
|
||||
kp->ki_rssize += td0->td_kstack_pages;
|
||||
if (td0->td_altkstack_obj != NULL)
|
||||
kp->ki_rssize += td0->td_altkstack_pages;
|
||||
}
|
||||
kp->ki_swrss = vm->vm_swrss;
|
||||
kp->ki_tsize = vm->vm_tsize;
|
||||
|
Loading…
Reference in New Issue
Block a user