svn commit: r330748 - user/jeff/numa/sys/vm

Jeff Roberson jeff at FreeBSD.org
Sat Mar 10 23:04:04 UTC 2018


Author: jeff
Date: Sat Mar 10 23:04:03 2018
New Revision: 330748
URL: https://svnweb.freebsd.org/changeset/base/330748

Log:
  Review feedback from D14612

Modified:
  user/jeff/numa/sys/vm/vm_page.c
  user/jeff/numa/sys/vm/vm_pageout.c

Modified: user/jeff/numa/sys/vm/vm_page.c
==============================================================================
--- user/jeff/numa/sys/vm/vm_page.c	Sat Mar 10 22:52:39 2018	(r330747)
+++ user/jeff/numa/sys/vm/vm_page.c	Sat Mar 10 23:04:03 2018	(r330748)
@@ -147,8 +147,8 @@ struct vm_domain vm_dom[MAXMEMDOM];
 
 struct mtx_padalign __exclusive_cache_line pa_lock[PA_LOCK_COUNT];
 
-/* The following fields are protected by the domainset lock. */
 struct mtx_padalign __exclusive_cache_line vm_domainset_lock;
+/* The following fields are protected by the domainset lock. */
 domainset_t __exclusive_cache_line vm_min_domains;
 domainset_t __exclusive_cache_line vm_severe_domains;
 static int vm_min_waiters;
@@ -779,7 +779,7 @@ vm_page_startup(vm_offset_t vaddr)
 			vm_domain_free_lock(vmd);
 			vm_phys_free_contig(m, pagecount);
 			vm_domain_free_unlock(vmd);
-			vm_domain_freecnt_inc(vmd, (int)pagecount);
+			vm_domain_freecnt_inc(vmd, pagecount);
 			vm_cnt.v_page_count += (u_int)pagecount;
 
 			vmd = VM_DOMAIN(seg->domain);;
@@ -2816,8 +2816,9 @@ vm_domain_clear(struct vm_domain *vmd)
 			wakeup(&vm_severe_domains);
 		}
 	}
+
 	/*
-	 * if pageout daemon needs pages, then tell it that there are
+	 * If pageout daemon needs pages, then tell it that there are
 	 * some free.
 	 */
 	if (vmd->vmd_pageout_pages_needed &&
@@ -2826,7 +2827,7 @@ vm_domain_clear(struct vm_domain *vmd)
 		vmd->vmd_pageout_pages_needed = 0;
 	}
 
-	/* See comments in vm_wait(); */
+	/* See comments in vm_wait_doms(). */
 	if (vm_pageproc_waiters) {
 		vm_pageproc_waiters = 0;
 		wakeup(&vm_pageproc_waiters);

Modified: user/jeff/numa/sys/vm/vm_pageout.c
==============================================================================
--- user/jeff/numa/sys/vm/vm_pageout.c	Sat Mar 10 22:52:39 2018	(r330747)
+++ user/jeff/numa/sys/vm/vm_pageout.c	Sat Mar 10 23:04:03 2018	(r330748)
@@ -1895,7 +1895,7 @@ vm_pageout_worker(void *arg)
 	while (TRUE) {
 		vm_domain_pageout_lock(vmd);
 		/*
-		 * Wwe need to clear wanted before we check the limits.  This
+		 * We need to clear wanted before we check the limits.  This
 		 * prevents races with wakers who will check wanted after they
 		 * reach the limit.
 		 */
@@ -1923,7 +1923,7 @@ vm_pageout_worker(void *arg)
 			    "psleep", hz / VM_INACT_SCAN_RATE) == 0)
 				VM_CNT_INC(v_pdwakeups);
 		}
-		/* Prevent spurior wakeups by ensuring that wanted is set. */
+		/* Prevent spurious wakeups by ensuring that wanted is set. */
 		atomic_store_int(&vmd->vmd_pageout_wanted, 1);
 
 		/*
@@ -2103,7 +2103,7 @@ pagedaemon_wakeup(int domain)
 
 	vmd = VM_DOMAIN(domain);
 	vm_domain_pageout_assert_unlocked(vmd);
-	if (curthread->td_proc == pageproc)
+	if (curproc == pageproc)
 		return;
 
 	if (atomic_fetchadd_int(&vmd->vmd_pageout_wanted, 1) == 0) {


More information about the svn-src-user mailing list