Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_pageout.c
Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | SYSCTL_UINT(_vm, OID_AUTO, background_launder_rate, CTLFLAG_RWTUN, | ||||
"background laundering rate, in kilobytes per second"); | "background laundering rate, in kilobytes per second"); | ||||
static u_int vm_background_launder_max = 20 * 1024; | static u_int vm_background_launder_max = 20 * 1024; | ||||
SYSCTL_UINT(_vm, OID_AUTO, background_launder_max, CTLFLAG_RWTUN, | SYSCTL_UINT(_vm, OID_AUTO, background_launder_max, CTLFLAG_RWTUN, | ||||
&vm_background_launder_max, 0, "background laundering cap, in kilobytes"); | &vm_background_launder_max, 0, "background laundering cap, in kilobytes"); | ||||
int vm_pageout_page_count = 32; | int vm_pageout_page_count = 32; | ||||
int vm_page_max_wired; /* XXX max # of wired pages system-wide */ | u_long vm_page_max_user_wired; | ||||
SYSCTL_INT(_vm, OID_AUTO, max_wired, | SYSCTL_ULONG(_vm, OID_AUTO, max_user_wired, CTLFLAG_RW, | ||||
CTLFLAG_RW, &vm_page_max_wired, 0, "System-wide limit to wired page count"); | &vm_page_max_user_wired, 0, | ||||
kib: bde' preferred style is to have CTLFLAG_XXX on the previous line, and the variable address… | |||||
"system-wide limit to user-wired page count"); | |||||
static u_int isqrt(u_int num); | static u_int isqrt(u_int num); | ||||
static int vm_pageout_launder(struct vm_domain *vmd, int launder, | static int vm_pageout_launder(struct vm_domain *vmd, int launder, | ||||
bool in_shortfall); | bool in_shortfall); | ||||
static void vm_pageout_laundry_worker(void *arg); | static void vm_pageout_laundry_worker(void *arg); | ||||
struct scan_state { | struct scan_state { | ||||
struct vm_batchqueue bq; | struct vm_batchqueue bq; | ||||
▲ Show 20 Lines • Show All 1,818 Lines • ▼ Show 20 Lines | vm_pageout_init(void) | ||||
/* | /* | ||||
* Set interval in seconds for active scan. We want to visit each | * Set interval in seconds for active scan. We want to visit each | ||||
* page at least once every ten minutes. This is to prevent worst | * page at least once every ten minutes. This is to prevent worst | ||||
* case paging behaviors with stale active LRU. | * case paging behaviors with stale active LRU. | ||||
*/ | */ | ||||
if (vm_pageout_update_period == 0) | if (vm_pageout_update_period == 0) | ||||
vm_pageout_update_period = 600; | vm_pageout_update_period = 600; | ||||
if (vm_page_max_wired == 0) | if (vm_page_max_user_wired == 0) | ||||
vm_page_max_wired = freecount / 3; | vm_page_max_user_wired = freecount / 3; | ||||
} | } | ||||
/* | /* | ||||
* vm_pageout is the high level pageout daemon. | * vm_pageout is the high level pageout daemon. | ||||
*/ | */ | ||||
static void | static void | ||||
vm_pageout(void) | vm_pageout(void) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |
bde' preferred style is to have CTLFLAG_XXX on the previous line, and the variable address starting the first continuation line.