aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2016-07-20 00:09:22 +0000
committerMark Johnston <markj@FreeBSD.org>2016-07-20 00:09:22 +0000
commit20c58db95a4ea12e5c6daf2a34cbbc57b764ed3a (patch)
tree9768dca87b96e034193a6356bbfa0b6abd2698b7
parent359c502af5a3ae43ef17628526a7ebe115eafc43 (diff)
downloadsrc-20c58db95a4ea12e5c6daf2a34cbbc57b764ed3a.tar.gz
src-20c58db95a4ea12e5c6daf2a34cbbc57b764ed3a.zip
Make vm_pageout_wakeup_thresh a u_int rather than an int.
It's a threshold for v_free_count, which is of type u_int. This also lets us get rid of a cast in vm_paging_needed(). Reviewed by: alc MFC after: 1 week
Notes
Notes: svn path=/head/; revision=303052
-rw-r--r--sys/sys/vmmeter.h4
-rw-r--r--sys/vm/vm_pageout.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h
index 55d3053ab0c2..39f03d0d7075 100644
--- a/sys/sys/vmmeter.h
+++ b/sys/sys/vmmeter.h
@@ -117,7 +117,7 @@ struct vmmeter {
extern struct vmmeter vm_cnt;
-extern int vm_pageout_wakeup_thresh;
+extern u_int vm_pageout_wakeup_thresh;
/*
* Return TRUE if we are under our severe low-free-pages threshold
@@ -181,7 +181,7 @@ vm_paging_needed(void)
{
return (vm_cnt.v_free_count + vm_cnt.v_cache_count <
- (u_int)vm_pageout_wakeup_thresh);
+ vm_pageout_wakeup_thresh);
}
#endif
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 8bf3e9cc413a..610fdd72df5e 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -157,7 +157,7 @@ SYSINIT(vmdaemon, SI_SUB_KTHREAD_VM, SI_ORDER_FIRST, kproc_start, &vm_kp);
int vm_pageout_deficit; /* Estimated number of pages deficit */
-int vm_pageout_wakeup_thresh;
+u_int vm_pageout_wakeup_thresh;
static int vm_pageout_oom_seq = 12;
bool vm_pageout_wanted; /* Event on which pageout daemon sleeps */
bool vm_pages_needed; /* Are threads waiting for free pages? */