Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142355557
D26610.id77689.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26610.id77689.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D26610: vm_pageout: Avoid rounding down the inactive scan target
Attached
Detach File
Event Timeline
Log In to Comment