Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Oct 2015 19:27:53 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288627 - head/sys/vm
Message-ID:  <201510031927.t93JRrvt073442@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sat Oct  3 19:27:52 2015
New Revision: 288627
URL: https://svnweb.freebsd.org/changeset/base/288627

Log:
  Reduce the scope of a variable to the only file where it is used.

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

Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c	Sat Oct  3 19:08:36 2015	(r288626)
+++ head/sys/vm/vm_page.c	Sat Oct  3 19:27:52 2015	(r288627)
@@ -149,6 +149,8 @@ static int sysctl_vm_page_blacklist(SYSC
 SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD |
     CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_blacklist, "A", "Blacklist pages");
 
+/* Is the page daemon waiting for free pages? */
+static int vm_pageout_pages_needed;
 
 static uma_zone_t fakepg_zone;
 

Modified: head/sys/vm/vm_pageout.c
==============================================================================
--- head/sys/vm/vm_pageout.c	Sat Oct  3 19:08:36 2015	(r288626)
+++ head/sys/vm/vm_pageout.c	Sat Oct  3 19:27:52 2015	(r288627)
@@ -157,7 +157,6 @@ SYSINIT(vmdaemon, SI_SUB_KTHREAD_VM, SI_
 
 int vm_pages_needed;		/* Event on which pageout daemon sleeps */
 int vm_pageout_deficit;		/* Estimated number of pages deficit */
-int vm_pageout_pages_needed;	/* flag saying that the pageout daemon needs pages */
 int vm_pageout_wakeup_thresh;
 
 #if !defined(NO_SWAPPING)

Modified: head/sys/vm/vm_pageout.h
==============================================================================
--- head/sys/vm/vm_pageout.h	Sat Oct  3 19:08:36 2015	(r288626)
+++ head/sys/vm/vm_pageout.h	Sat Oct  3 19:27:52 2015	(r288627)
@@ -73,7 +73,6 @@
 
 extern int vm_page_max_wired;
 extern int vm_pages_needed;	/* should be some "event" structure */
-extern int vm_pageout_pages_needed;
 extern int vm_pageout_deficit;
 extern int vm_pageout_page_count;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510031927.t93JRrvt073442>