summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_fault.c13
-rw-r--r--sys/vm/vm_glue.c4
2 files changed, 6 insertions, 11 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 5855430..614956a 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -918,15 +918,10 @@ readrest:
* Unlock everything, and return
*/
unlock_and_deallocate(&fs);
- PROC_LOCK(curproc);
- if ((curproc->p_sflag & PS_INMEM) && curproc->p_stats) {
- if (hardfault) {
- curproc->p_stats->p_ru.ru_majflt++;
- } else {
- curproc->p_stats->p_ru.ru_minflt++;
- }
- }
- PROC_UNLOCK(curproc);
+ if (hardfault)
+ curthread->td_ru.ru_majflt++;
+ else
+ curthread->td_ru.ru_minflt++;
return (KERN_SUCCESS);
}
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index a3749bf..cb2a657 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -986,8 +986,8 @@ swapout(p)
("swapout: there is a thread not safe for swapout"));
}
#endif /* INVARIANTS */
-
- ++p->p_stats->p_ru.ru_nswap;
+ td = FIRST_THREAD_IN_PROC(p);
+ ++td->td_ru.ru_nswap;
/*
* remember the process resident count
*/
OpenPOWER on IntegriCloud