Only wire pages in the LinuxKPI instead of holding and wiring them.

This prevents the page daemon from regularly scanning the held pages.

Suggested by:		kib @
MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
hselasky 2017-09-18 13:23:59 +00:00
parent cb9941733e
commit 46b8388842
2 changed files with 2 additions and 5 deletions

View File

@ -220,7 +220,6 @@ static inline void
get_page(struct vm_page *page)
{
vm_page_lock(page);
vm_page_hold(page);
vm_page_wire(page);
vm_page_unlock(page);
}
@ -245,7 +244,6 @@ put_page(struct vm_page *page)
{
vm_page_lock(page);
vm_page_unwire(page, PQ_ACTIVE);
vm_page_unhold(page);
vm_page_unlock(page);
}

View File

@ -209,6 +209,7 @@ linux_get_user_pages_internal(vm_map_t map, unsigned long start, int nr_pages,
vm_page_lock(pg);
vm_page_wire(pg);
vm_page_unhold(pg);
vm_page_unlock(pg);
}
return (nr_pages);
@ -243,6 +244,7 @@ __get_user_pages_fast(unsigned long start, int nr_pages, int write,
vm_page_lock(*mp);
vm_page_wire(*mp);
vm_page_unhold(*mp);
vm_page_unlock(*mp);
if ((prot & VM_PROT_WRITE) != 0 &&
@ -323,9 +325,6 @@ linux_shmem_read_mapping_page_gfp(vm_object_t obj, int pindex, gfp_t gfp)
}
vm_page_xunbusy(page);
}
vm_page_lock(page);
vm_page_hold(page);
vm_page_unlock(page);
VM_OBJECT_WUNLOCK(obj);
return (page);
}