Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154412358
D23517.id.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
D23517.id.diff
View Options
Index: sys/vm/vm_pageout.c
===================================================================
--- sys/vm/vm_pageout.c
+++ sys/vm/vm_pageout.c
@@ -1122,7 +1122,7 @@
if (vmd->vmd_laundry_request == VM_LAUNDRY_SHORTFALL &&
(!in_shortfall || shortfall_cycle == 0)) {
shortfall = vm_laundry_target(vmd) +
- vmd->vmd_pageout_deficit;
+ atomic_load_int(&vmd->vmd_shortage);
target = 0;
} else
shortfall = 0;
@@ -2063,14 +2063,17 @@
*/
shortage = pidctrl_daemon(&vmd->vmd_pid, vmd->vmd_free_count);
if (shortage > 0) {
+ atomic_store_int(&vmd->vmd_shortage, shortage);
ofree = vmd->vmd_free_count;
if (vm_pageout_lowmem() && vmd->vmd_free_count > ofree)
shortage -= min(vmd->vmd_free_count - ofree,
(u_int)shortage);
target_met = vm_pageout_scan_inactive(vmd, shortage,
&addl_shortage);
- } else
+ } else {
+ atomic_store_int(&vmd->vmd_shortage, 0);
addl_shortage = 0;
+ }
/*
* Scan the active queue. A positive value for shortage
Index: sys/vm/vm_pagequeue.h
===================================================================
--- sys/vm/vm_pagequeue.h
+++ sys/vm/vm_pagequeue.h
@@ -249,6 +249,7 @@
long vmd_segs; /* (c) bitmask of the segments */
u_int __aligned(CACHE_LINE_SIZE) vmd_free_count; /* (a,f) free page count */
u_int vmd_pageout_deficit; /* (a) Estimated number of pages deficit */
+ u_int vmd_shortage; /* (a) Current predicted shortage. */
uint8_t vmd_pad[CACHE_LINE_SIZE - (sizeof(u_int) * 2)];
/* Paging control variables, used within single threaded page daemon. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 29, 9:53 AM (16 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32341119
Default Alt Text
D23517.id.diff (1 KB)
Attached To
Mode
D23517: Align the laundry and page out worker shortfall calculations
Attached
Detach File
Event Timeline
Log In to Comment