From e2de171791892c1c009809a081cd03b0898911a5 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 9 Mar 2016 17:03:07 -0800 Subject: [PATCH 03/16] Remove vm_page_is_cached(). --- sys/vm/vm_mmap.c | 3 --- sys/vm/vm_page.c | 27 --------------------------- 2 files changed, 30 deletions(-) diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index ca48df8..2abe78b 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -875,9 +875,6 @@ RestartScan: pindex = OFF_TO_IDX(current->offset + (addr - current->start)); m = vm_page_lookup(object, pindex); - if (m == NULL && - vm_page_is_cached(object, pindex)) - mincoreinfo = MINCORE_INCORE; if (m != NULL && m->valid == 0) m = NULL; if (m != NULL) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 0ff5cf5..5ffb3bb 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1495,33 +1495,6 @@ vm_page_cache_transfer(vm_object_t orig_object, vm_pindex_t offidxstart, } /* - * Returns TRUE if a cached page is associated with the given object and - * offset, and FALSE otherwise. - * - * The object must be locked. - */ -boolean_t -vm_page_is_cached(vm_object_t object, vm_pindex_t pindex) -{ - vm_page_t m; - - /* - * Insertion into an object's collection of cached pages requires the - * object to be locked. Therefore, if the object is locked and the - * object's collection is empty, there is no need to acquire the free - * page queues lock in order to prove that the specified page doesn't - * exist. - */ - VM_OBJECT_ASSERT_WLOCKED(object); - if (__predict_true(vm_object_cache_is_empty(object))) - return (FALSE); - mtx_lock(&vm_page_queue_free_mtx); - m = vm_page_cache_lookup(object, pindex); - mtx_unlock(&vm_page_queue_free_mtx); - return (m != NULL); -} - -/* * vm_page_alloc: * * Allocate and return a page that is associated with the specified -- 2.8.1