Exploit r288122 to address a cosmetic issue. Pages belonging to either

the kernel or kmem object can't be paged out.  Since they can't be paged
out, they are never enqueued in a paging queue.  Nonetheless, passing
PQ_INACTIVE to vm_page_unwire() in kmem_unback() creates the appearance
that these pages are being enqueued in the inactive queue.  As of r288122,
we can avoid giving this false impression by passing PQ_NONE.

Submitted by:	kmacy
Differential Revision:	https://reviews.freebsd.org/D1674
This commit is contained in:
Alan Cox 2015-10-06 05:49:00 +00:00
parent b946bedd09
commit 27e9ed8a5a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288912

View File

@ -386,7 +386,7 @@ kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size)
VM_OBJECT_WLOCK(object);
for (i = 0; i < size; i += PAGE_SIZE) {
m = vm_page_lookup(object, OFF_TO_IDX(offset + i));
vm_page_unwire(m, PQ_INACTIVE);
vm_page_unwire(m, PQ_NONE);
vm_page_free(m);
}
VM_OBJECT_WUNLOCK(object);