diff options
author | alc <alc@FreeBSD.org> | 2007-07-06 21:25:21 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2007-07-06 21:25:21 +0000 |
commit | 0985df88fce8b53350ba7440655502f80785ea5b (patch) | |
tree | c4d5df005a18450a7ba95cac4c0e3a29cb13276f /sys/vm | |
parent | 61d2caa816ebeecccb5edfca43b374c81aefef7a (diff) | |
download | FreeBSD-src-0985df88fce8b53350ba7440655502f80785ea5b.zip FreeBSD-src-0985df88fce8b53350ba7440655502f80785ea5b.tar.gz |
When a cached page is reactivated in vm_fault(), update the counter that
tracks the total number of reactivated pages. (We have not been
counting reactivations by vm_fault() since revision 1.46.)
Correct a comment in vm_fault_additional_pages().
Approved by: re (kensmith)
MFC after: 1 week
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_fault.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 28e23fa..2e51181 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -402,13 +402,15 @@ RetryFault:; vm_pageq_remove_nowakeup(fs.m); - if (VM_PAGE_RESOLVEQUEUE(fs.m, queue) == PQ_CACHE && - vm_page_count_severe()) { - vm_page_activate(fs.m); - vm_page_unlock_queues(); - unlock_and_deallocate(&fs); - VM_WAITPFAULT; - goto RetryFault; + if (VM_PAGE_RESOLVEQUEUE(fs.m, queue) == PQ_CACHE) { + cnt.v_reactivated++; + if (vm_page_count_severe()) { + vm_page_activate(fs.m); + vm_page_unlock_queues(); + unlock_and_deallocate(&fs); + VM_WAITPFAULT; + goto RetryFault; + } } vm_page_unlock_queues(); @@ -1335,6 +1337,6 @@ vm_fault_additional_pages(m, rbehind, rahead, marray, reqpage) marray[i] = rtm; } - /* return number of bytes of pages */ + /* return number of pages */ return i; } |