mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Perform a single batched update to the object's paging-in-progress count
rather than updating it for each page.
This commit is contained in:
parent
6095f7cad3
commit
acada7aef0
1 changed files with 2 additions and 4 deletions
|
|
@ -2050,11 +2050,10 @@ vfs_vmio_iodone(struct buf *bp)
|
|||
(intmax_t)foff, (uintmax_t)m->pindex));
|
||||
|
||||
vm_page_sunbusy(m);
|
||||
vm_object_pip_subtract(obj, 1);
|
||||
foff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK;
|
||||
iosize -= resid;
|
||||
}
|
||||
vm_object_pip_wakeupn(obj, 0);
|
||||
vm_object_pip_wakeupn(obj, bp->b_npages);
|
||||
VM_OBJECT_WUNLOCK(obj);
|
||||
if (bogus && buf_mapped(bp)) {
|
||||
BUF_CHECK_MAPPED(bp);
|
||||
|
|
@ -3923,10 +3922,9 @@ vfs_unbusy_pages(struct buf *bp)
|
|||
} else
|
||||
BUF_CHECK_UNMAPPED(bp);
|
||||
}
|
||||
vm_object_pip_subtract(obj, 1);
|
||||
vm_page_sunbusy(m);
|
||||
}
|
||||
vm_object_pip_wakeupn(obj, 0);
|
||||
vm_object_pip_wakeupn(obj, bp->b_npages);
|
||||
VM_OBJECT_WUNLOCK(obj);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue