diff options
author | chuck <chuck@cvs.openbsd.org> | 1998-03-26 21:36:19 +0000 |
---|---|---|
committer | chuck <chuck@cvs.openbsd.org> | 1998-03-26 21:36:19 +0000 |
commit | 07b766f8de859cd76e4304cb7fb9cc4410d830cf (patch) | |
tree | 97dbde7d0619d2689d6727be5f3bc8336b978563 /sys | |
parent | 580df3c4cda4392201cb8e70b1846abe3f17b74c (diff) |
correctly count ru_majflt. the fix pulled in from netbsd pr#1397 is
incorrect. calling vm_pager_get() doesn't count as a "majflt" unless the
pager returns VM_PAGER_OK. when walking an object chain we can get
VM_PAGER_FAIL (indicating that the requested data does not reside in
this object and we must continue to walk the chain) -- we don't want to
count this as a majflt.
i also added code to count ru_minflt.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_fault.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index cbf765aab9e..4cbb134dde5 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_fault.c,v 1.14 1998/03/01 00:38:04 niklas Exp $ */ +/* $OpenBSD: vm_fault.c,v 1.15 1998/03/26 21:36:18 chuck Exp $ */ /* $NetBSD: vm_fault.c,v 1.21 1998/01/31 04:02:39 ross Exp $ */ /* @@ -286,6 +286,7 @@ vm_fault(map, vaddr, fault_type, change_wiring) * Mark page busy for other threads. */ m->flags |= PG_BUSY; + curproc->p_addr->u_stats.p_ru.ru_minflt++; break; } @@ -320,7 +321,6 @@ vm_fault(map, vaddr, fault_type, change_wiring) */ UNLOCK_MAP; cnt.v_pageins++; - curproc->p_addr->u_stats.p_ru.ru_majflt++; rv = vm_pager_get(object->pager, m, TRUE); /* @@ -345,6 +345,7 @@ vm_fault(map, vaddr, fault_type, change_wiring) m->flags &= ~PG_FAKE; m->flags |= PG_CLEAN; pmap_clear_modify(VM_PAGE_TO_PHYS(m)); + curproc->p_addr->u_stats.p_ru.ru_majflt++; break; } @@ -409,6 +410,7 @@ vm_fault(map, vaddr, fault_type, change_wiring) vm_page_zero_fill(m); cnt.v_zfod++; m->flags &= ~PG_FAKE; + curproc->p_addr->u_stats.p_ru.ru_minflt++; break; } else { |