diff options
author | attilio <attilio@FreeBSD.org> | 2013-03-04 12:33:40 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-03-04 12:33:40 +0000 |
commit | 709ad55889c4199b88fe7dee69c38a54ead05501 (patch) | |
tree | f8a5d36c4920e2c30960c0b035bd028d000d5c75 /sys/vm/vm_object.c | |
parent | a8671df14b60140e0af340fa7814b371a0c6096f (diff) | |
download | FreeBSD-src-709ad55889c4199b88fe7dee69c38a54ead05501.zip FreeBSD-src-709ad55889c4199b88fe7dee69c38a54ead05501.tar.gz |
Evaluations on the likelyhood of empty object cache cannot be made in
general way but must be evaluated case by case.
Embedd the decision in the caller themselves rather than in a
general purpose KPI.
Sponsored by: EMC / Isilon storage division
Reported by: alc
Reviewed by: alc
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r-- | sys/vm/vm_object.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index c213c64..606b605 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -755,7 +755,7 @@ vm_object_terminate(vm_object_t object) if (__predict_false(!LIST_EMPTY(&object->rvq))) vm_reserv_break_all(object); #endif - if (!vm_object_cache_is_empty(object)) + if (__predict_false(!vm_object_cache_is_empty(object))) vm_page_cache_free(object, 0, 0); /* @@ -1380,7 +1380,7 @@ retry: * should still be OBJT_DEFAULT and orig_object should not * contain any cached pages within the specified range. */ - if (!vm_object_cache_is_empty(orig_object)) + if (__predict_false(!vm_object_cache_is_empty(orig_object))) vm_page_cache_transfer(orig_object, offidxstart, new_object); } @@ -1729,7 +1729,8 @@ vm_object_collapse(vm_object_t object) /* * Free any cached pages from backing_object. */ - if (!vm_object_cache_is_empty(backing_object)) + if (__predict_false( + !vm_object_cache_is_empty(backing_object))) vm_page_cache_free(backing_object, 0, 0); } /* @@ -1923,7 +1924,7 @@ again: } vm_object_pip_wakeup(object); skipmemq: - if (!vm_object_cache_is_empty(object)) + if (__predict_false(!vm_object_cache_is_empty(object))) vm_page_cache_free(object, start, end); } |