Author: markj
Date: Wed Jul 20 00:09:22 2016
New Revision: 303052
URL: https://svnweb.freebsd.org/changeset/base/303052

Log:
  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

Modified:
  head/sys/sys/vmmeter.h
  head/sys/vm/vm_pageout.c

Modified: head/sys/sys/vmmeter.h
==============================================================================
--- head/sys/sys/vmmeter.h      Wed Jul 20 00:06:03 2016        (r303051)
+++ head/sys/sys/vmmeter.h      Wed Jul 20 00:09:22 2016        (r303052)
@@ -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

Modified: head/sys/vm/vm_pageout.c
==============================================================================
--- head/sys/vm/vm_pageout.c    Wed Jul 20 00:06:03 2016        (r303051)
+++ head/sys/vm/vm_pageout.c    Wed Jul 20 00:09:22 2016        (r303052)
@@ -157,7 +157,7 @@ SYSINIT(vmdaemon, SI_SUB_KTHREAD_VM, SI_
 
 
 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? */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to