When tmpfs and POSIX shm pagein a page for the sole purpose of performing
truncation, immediately queue the page for asynchronous laundering rather than making the page pass through inactive queue first. Reviewed by: kib, markj
This commit is contained in:
parent
16f58155c2
commit
924c556274
@ -1376,7 +1376,15 @@ tmpfs_reg_resize(struct vnode *vp, off_t newsize, boolean_t ignerr)
|
||||
NULL);
|
||||
vm_page_lock(m);
|
||||
if (rv == VM_PAGER_OK) {
|
||||
vm_page_deactivate(m);
|
||||
/*
|
||||
* Since the page was not resident,
|
||||
* and therefore not recently
|
||||
* accessed, immediately enqueue it
|
||||
* for asynchronous laundering. The
|
||||
* current operation is not regarded
|
||||
* as an access.
|
||||
*/
|
||||
vm_page_launder(m);
|
||||
vm_page_unlock(m);
|
||||
vm_page_xunbusy(m);
|
||||
} else {
|
||||
|
@ -460,7 +460,15 @@ shm_dotruncate(struct shmfd *shmfd, off_t length)
|
||||
NULL);
|
||||
vm_page_lock(m);
|
||||
if (rv == VM_PAGER_OK) {
|
||||
vm_page_deactivate(m);
|
||||
/*
|
||||
* Since the page was not resident,
|
||||
* and therefore not recently
|
||||
* accessed, immediately enqueue it
|
||||
* for asynchronous laundering. The
|
||||
* current operation is not regarded
|
||||
* as an access.
|
||||
*/
|
||||
vm_page_launder(m);
|
||||
vm_page_unlock(m);
|
||||
vm_page_xunbusy(m);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user