Page MenuHomeFreeBSD

D26610.id77689.diff
No OneTemporary

D26610.id77689.diff

Index: sys/vm/vm_pageout.c
===================================================================
--- sys/vm/vm_pageout.c
+++ sys/vm/vm_pageout.c
@@ -1649,15 +1649,12 @@
/*
* Dispatch a number of inactive threads according to load and collect the
- * results to prevent a coherent (CEM: incoherent?) view of paging activity on
- * this domain.
+ * results to present a coherent view of paging activity on this domain.
*/
static int
vm_pageout_inactive_dispatch(struct vm_domain *vmd, int shortage)
{
- u_int freed, pps, threads, us;
-
- vmd->vmd_inactive_shortage = shortage;
+ u_int freed, pps, slop, threads, us;
/*
* If we have more work than we can do in a quarter of our interval, we
@@ -1667,15 +1664,19 @@
shortage > vmd->vmd_inactive_pps / VM_INACT_SCAN_RATE / 4) {
threads = vmd->vmd_inactive_threads;
vm_domain_pageout_lock(vmd);
- vmd->vmd_inactive_shortage /= threads;
+ vmd->vmd_inactive_shortage = shortage / threads;
+ slop = shortage % threads;
blockcount_acquire(&vmd->vmd_inactive_starting, threads - 1);
blockcount_acquire(&vmd->vmd_inactive_running, threads - 1);
wakeup(&vmd->vmd_inactive_shortage);
vm_domain_pageout_unlock(vmd);
+ } else {
+ vmd->vmd_inactive_shortage = shortage;
+ slop = 0;
}
/* Run the local thread scan. */
- vm_pageout_scan_inactive(vmd, vmd->vmd_inactive_shortage);
+ vm_pageout_scan_inactive(vmd, vmd->vmd_inactive_shortage + slop);
/*
* Block until helper threads report results and then accumulate

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 19, 11:53 PM (19 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27756574
Default Alt Text
D26610.id77689.diff (1 KB)

Event Timeline