Module Name:    src
Committed By:   matt
Date:           Thu Feb 16 04:20:46 UTC 2012

Modified Files:
        src/sys/uvm [matt-nb5-mips64]: uvm_anon.c uvm_page.c uvm_page.h
            uvm_pdaemon.c uvm_pglist.h uvm_stat.c

Log Message:
Track the victims selected by the pagedaemon and what happens to then.
Keep a hint for what page group has the most free pages for a given color.


To generate a diff of this commit:
cvs rdiff -u -r1.51.28.1 -r1.51.28.2 src/sys/uvm/uvm_anon.c
cvs rdiff -u -r1.140.6.3.4.8 -r1.140.6.3.4.9 src/sys/uvm/uvm_page.c
cvs rdiff -u -r1.55.14.7 -r1.55.14.8 src/sys/uvm/uvm_page.h
cvs rdiff -u -r1.93.4.2.4.5 -r1.93.4.2.4.6 src/sys/uvm/uvm_pdaemon.c
cvs rdiff -u -r1.7.16.4 -r1.7.16.5 src/sys/uvm/uvm_pglist.h
cvs rdiff -u -r1.31.12.2 -r1.31.12.3 src/sys/uvm/uvm_stat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_anon.c
diff -u src/sys/uvm/uvm_anon.c:1.51.28.1 src/sys/uvm/uvm_anon.c:1.51.28.2
--- src/sys/uvm/uvm_anon.c:1.51.28.1	Tue Feb 14 01:12:42 2012
+++ src/sys/uvm/uvm_anon.c	Thu Feb 16 04:20:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_anon.c,v 1.51.28.1 2012/02/14 01:12:42 matt Exp $	*/
+/*	$NetBSD: uvm_anon.c,v 1.51.28.2 2012/02/16 04:20:45 matt Exp $	*/
 
 /*
  *
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.51.28.1 2012/02/14 01:12:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.51.28.2 2012/02/16 04:20:45 matt Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -192,7 +192,6 @@ uvm_anfree(struct vm_anon *anon)
 				return;
 			}
 			mutex_enter(&uvm_pageqlock);
-			uvm_pagedequeue(pg);
 			uvm_pagefree(pg);
 			mutex_exit(&uvm_pageqlock);
 			mutex_exit(&anon->an_lock);

Index: src/sys/uvm/uvm_page.c
diff -u src/sys/uvm/uvm_page.c:1.140.6.3.4.8 src/sys/uvm/uvm_page.c:1.140.6.3.4.9
--- src/sys/uvm/uvm_page.c:1.140.6.3.4.8	Tue Feb 14 01:12:42 2012
+++ src/sys/uvm/uvm_page.c	Thu Feb 16 04:20:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.140.6.3.4.8 2012/02/14 01:12:42 matt Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.140.6.3.4.9 2012/02/16 04:20:45 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.140.6.3.4.8 2012/02/14 01:12:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.140.6.3.4.9 2012/02/16 04:20:45 matt Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_readahead.h"
@@ -321,12 +321,17 @@ uvm_pageremove(struct vm_page *pg)
 }
 
 static void
-uvm_page_init_freelist(struct pgfreelist *pgfl)
+uvm_page_init_freelist(struct pgfreelist *pgfl, struct uvm_pggroup *pggroups,
+	size_t color)
 {
 	for (size_t free_list = 0; free_list < VM_NFREELIST; free_list++) {
 		for (size_t queue = 0; queue < PGFL_NQUEUES; queue++) {
 			LIST_INIT(&pgfl->pgfl_queues[free_list][queue]);
 		}
+		pgfl->pgfl_pggroups[free_list] =
+		    &pggroups[free_list * uvmexp.ncolors + color];
+		pgfl->pgfl_pggroups[free_list]->pgrp_free_list = free_list;
+		pgfl->pgfl_pggroups[free_list]->pgrp_color = color;
 	}
 	for (size_t queue = 0; queue < PGFL_NQUEUES; queue++) {
 		pgfl->pgfl_pages[queue] = 0;
@@ -435,8 +440,10 @@ uvm_page_init(vaddr_t *kvm_startp, vaddr
 	KASSERT(pagearray != NULL);
 
 	for (u_int color = 0; color < uvmexp.ncolors; color++) {
-		uvm_page_init_freelist(&uvm.page_free[color]);
-		uvm_page_init_freelist(&uvm.cpus[0].page_free[color]);
+		uvm_page_init_freelist(&uvm.page_free[color],
+		    grparray, color);
+		uvm_page_init_freelist(&uvm.cpus[0].page_free[color],
+		    grparray, color);
 	}
 
 	memset(pagearray, 0, pagecount * sizeof(struct vm_page));
@@ -466,7 +473,7 @@ uvm_page_init(vaddr_t *kvm_startp, vaddr
 			if (i >= seg->avail_start && i < seg->avail_end) {
 				size_t pggroup = VM_PAGE_TO_PGGROUP(pg, uvmexp.ncolors);
 				uvmexp.npages++;
-				
+
 				KASSERT(pggroup < npggroup);
 				if (grparray[pggroup].pgrp_npages++ == 0) {
 					uvmexp.npggroups++;
@@ -962,8 +969,8 @@ uvm_page_recolor(int newncolors)
 
 	ucpu = curcpu()->ci_data.cpu_uvm;
 	for (color = 0; color < newncolors; color++) {
-		uvm_page_init_freelist(&uvmarray[color]);
-		uvm_page_init_freelist(&cpuarray[color]);
+		uvm_page_init_freelist(&uvmarray[color], grparray, color);
+		uvm_page_init_freelist(&cpuarray[color], grparray, color);
 	}
 	old_gpgfl = olduvmarray;
 	old_pgfl = ucpu->page_free;
@@ -1082,7 +1089,8 @@ uvm_cpu_attach(struct cpu_info *ci)
 	ucpu->page_free = malloc(uvmexp.ncolors * sizeof(ucpu->page_free[0]),
 	    M_VMPAGE, M_WAITOK);
 	for (size_t color = 0; color < uvmexp.ncolors; color++) {
-		uvm_page_init_freelist(&ucpu->page_free[color]);
+		uvm_page_init_freelist(&ucpu->page_free[color],
+		    uvm.pggroups, color);
 	}
 	ci->ci_data.cpu_uvm = ucpu;
 }
@@ -1284,7 +1292,16 @@ uvm_pagealloc_strat(struct uvm_object *o
 
  again:
 	switch (strat) {
-	case UVM_PGA_STRAT_NORMAL:
+	case UVM_PGA_STRAT_NORMAL: {
+		struct uvm_pggroup *hint = uvm.page_free[color].pgfl_hint;
+		if (hint != NULL) {
+			hint->pgrp_hints++;
+			pg = uvm_pagealloc_pgfl(ucpu, hint->pgrp_free_list,
+			    try1, try2, &color, anycolor);
+			if (pg != NULL)
+				goto gotit;
+			hint->pgrp_hintfails++;
+		}
 		/* Check all freelists in descending priority order. */
 		for (lcv = 0; lcv < VM_NFREELIST; lcv++) {
 #ifdef VM_FREELIST_NORMALOK_P
@@ -1295,6 +1312,11 @@ uvm_pagealloc_strat(struct uvm_object *o
 			if (!VM_FREELIST_NORMALOK_P(lcv))
 				continue;
 #endif
+			/*
+			 * If the hint didn't help, don't try it again.
+			 */
+			if (hint != NULL && hint->pgrp_free_list == lcv)
+				continue;
 			pg = uvm_pagealloc_pgfl(ucpu, lcv,
 			    try1, try2, &color, anycolor);
 			if (pg != NULL)
@@ -1302,7 +1324,9 @@ uvm_pagealloc_strat(struct uvm_object *o
 		}
 
 		/* No pages free! */
+		hint = NULL;
 		goto fail;
+	}
 
 	case UVM_PGA_STRAT_ONLY:
 	case UVM_PGA_STRAT_FALLBACK:
@@ -1499,7 +1523,6 @@ uvm_pagezerocheck(struct vm_page *pg)
 void
 uvm_pagefree(struct vm_page *pg)
 {
-	struct pgflist *pgfl;
 	struct uvm_cpu *ucpu;
 	int free_list, color, queue;
 	bool iszero;
@@ -1513,10 +1536,8 @@ uvm_pagefree(struct vm_page *pg)
 	}
 #endif /* DEBUG */
 
-	KASSERT(!uvmpdpol_pageisqueued_p(pg));
 	KASSERT((pg->flags & PG_PAGEOUT) == 0);
 	KASSERT(!(pg->pqflags & PQ_FREE));
-	KASSERT(mutex_owned(&uvm_pageqlock) || !uvmpdpol_pageisqueued_p(pg));
 	KASSERT(pg->uobject == NULL || mutex_owned(&pg->uobject->vmobjlock));
 	KASSERT(pg->uobject != NULL || pg->uanon == NULL ||
 		mutex_owned(&pg->uanon->an_lock));
@@ -1565,6 +1586,7 @@ uvm_pagefree(struct vm_page *pg)
 		if (pg->loan_count) {
 			KASSERT(pg->uobject == NULL);
 			if (pg->uanon == NULL) {
+				KASSERT(mutex_owned(&uvm_pageqlock));
 				uvm_pagedequeue(pg);
 			}
 			return;
@@ -1587,8 +1609,10 @@ uvm_pagefree(struct vm_page *pg)
 	/*
 	 * now remove the page from the queues.
 	 */
-
-	uvm_pagedequeue(pg);
+	if (uvmpdpol_pageisqueued_p(pg)) {
+		KASSERT(mutex_owned(&uvm_pageqlock));
+		uvm_pagedequeue(pg);
+	}
 
 	/*
 	 * if the page was wired, unwire it now.
@@ -1623,10 +1647,28 @@ uvm_pagefree(struct vm_page *pg)
 
 
 	/* global list */
-	pgfl = &uvm.page_free[color].pgfl_queues[free_list][queue];
-	LIST_INSERT_HEAD(pgfl, pg, pageq.list);
-	uvm.page_free[color].pgfl_pages[queue]++;
-	uvm_page_to_pggroup(pg)->pgrp_free++;
+	struct pgfreelist *gpgfl = &uvm.page_free[color];
+	LIST_INSERT_HEAD(&gpgfl->pgfl_queues[free_list][queue], pg, pageq.list);
+	gpgfl->pgfl_pages[queue]++;
+	struct uvm_pggroup * const grp = gpgfl->pgfl_pggroups[free_list];
+	struct uvm_pggroup * const hint = gpgfl->pgfl_hint;
+
+	/*
+	 * We ant to track which normal page group has the most free space and
+	 * use that when allocating normal pages.  Note that only the hint
+	 * is only updated here (though it might cleared in pagealloc).
+	 */
+	grp->pgrp_free++;
+	if (grp->pgrp_free >= grp->pgrp_freetarg
+#ifdef VM_FREELIST_NORMALOK_P
+	    && VM_FREELIST_NORMALOK_P(free_list)
+#endif
+	    && (hint == NULL
+		|| (grp->pgrp_free - grp->pgrp_freetarg 
+		    > hint->pgrp_free - hint->pgrp_freetarg))) {
+		gpgfl->pgfl_hint = grp;
+	}
+
 	uvmexp.free++;
 	if (iszero) {
 		uvmexp.zeropages++;
@@ -1635,9 +1677,9 @@ uvm_pagefree(struct vm_page *pg)
 	/* per-cpu list */
 	ucpu = curcpu()->ci_data.cpu_uvm;
 	pg->offset = (uintptr_t)ucpu;
-	pgfl = &ucpu->page_free[color].pgfl_queues[free_list][queue];
-	LIST_INSERT_HEAD(pgfl, pg, listq.list);
-	ucpu->page_free[color].pgfl_pages[queue]++;
+	struct pgfreelist *pgfl = &ucpu->page_free[color];
+	LIST_INSERT_HEAD(&pgfl->pgfl_queues[free_list][queue], pg, listq.list);
+	pgfl->pgfl_pages[queue]++;
 	ucpu->pages[queue]++;
 	if (ucpu->pages[PGFL_ZEROS] < ucpu->pages[PGFL_UNKNOWN]) {
 		ucpu->page_idle_zero = vm_page_zero_enable;
@@ -2045,5 +2087,6 @@ struct uvm_pggroup *
 uvm_page_to_pggroup(struct vm_page *pg)
 {
 	size_t pggroup = VM_PAGE_TO_PGGROUP(pg, uvmexp.ncolors);
+	KASSERT(pggroup < uvmexp.ncolors * VM_NFREELIST);
 	return &uvm.pggroups[pggroup];
 }

Index: src/sys/uvm/uvm_page.h
diff -u src/sys/uvm/uvm_page.h:1.55.14.7 src/sys/uvm/uvm_page.h:1.55.14.8
--- src/sys/uvm/uvm_page.h:1.55.14.7	Mon Feb 13 23:07:31 2012
+++ src/sys/uvm/uvm_page.h	Thu Feb 16 04:20:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.h,v 1.55.14.7 2012/02/13 23:07:31 matt Exp $	*/
+/*	$NetBSD: uvm_page.h,v 1.55.14.8 2012/02/16 04:20:45 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -253,6 +253,8 @@ struct uvm_pggroup {
 	STAILQ_ENTRY(uvm_pggroup) pgrp_uvm_link;
 
 	struct uvmpdpol_groupstate *pgrp_gs;	/* for pdpolicy */
+	u_int pgrp_free_list;	/* pages we manage are on this free_list */
+	u_int pgrp_color;	/* color of the pages we manage */
 
 	/* vm_page counters */
 	u_int pgrp_npages;	/* # of pages we manage */
@@ -276,6 +278,9 @@ struct uvm_pggroup {
 	/* internal stuff */
 	bool pgrp_scan_needed;	/* this color needs pages to be reclaimed */
 
+	uint64_t pgrp_hints;	/* # of hints for this page group */
+	uint64_t pgrp_hintfails; /* # of hints that failed */
+
 	/* page daemon counters */
 	uint64_t pgrp_pgswapout; /* # of pages swapped out */
 	uint64_t pgrp_pdrevs;	/* # of times daemon rev'd clock hand */
@@ -292,6 +297,9 @@ struct uvm_pggroup {
 	uint64_t pgrp_pdreanon;	/* anon pages reactivated due to thresholds */
 	uint64_t pgrp_pdrefile;	/* file pages reactivated due to thresholds */
 	uint64_t pgrp_pdreexec;	/* executable pages reactivated due to thresholds */
+	uint64_t pgrp_pdnullscans; /* # of daemon scanned with no victims */
+	uint64_t pgrp_pdvictims; /* # of pages selected by the daemon */
+	uint64_t pgrp_pdputs; /* # of pages the daemon has "put" */
 };
 
 TAILQ_HEAD(uvm_pggrouplist, uvm_pggroup);

Index: src/sys/uvm/uvm_pdaemon.c
diff -u src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.5 src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.6
--- src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.5	Tue Feb 14 01:12:42 2012
+++ src/sys/uvm/uvm_pdaemon.c	Thu Feb 16 04:20:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.5 2012/02/14 01:12:42 matt Exp $	*/
+/*	$NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.6 2012/02/16 04:20:45 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.5 2012/02/14 01:12:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.6 2012/02/16 04:20:45 matt Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_readahead.h"
@@ -842,8 +842,11 @@ uvmpd_scan_queue(struct uvm_pggroup *grp
 #if defined(VMSWAP)
 	struct swapcluster swc;
 #endif /* defined(VMSWAP) */
-	int dirtyreacts;
-	int lockownerfail;
+	u_int dirtyreacts;
+	u_int lockownerfail;
+	u_int victims;
+	u_int freed;
+	u_int busy;
 	kmutex_t *slock;
 	UVMHIST_FUNC("uvmpd_scan_queue"); UVMHIST_CALLED(pdhist);
 
@@ -859,8 +862,13 @@ uvmpd_scan_queue(struct uvm_pggroup *grp
 
 	dirtyreacts = 0;
 	lockownerfail = 0;
+	victims = 0;
+	freed = 0;
+	busy = 0;
 	uvmpdpol_scaninit(grp);
 
+	UVMHIST_LOG(pdhist,"  [%zd]: want free target (%u)",
+	    grp - uvm.pggrous, grp->pgrp_freetarg << 2, 0, 0);
 	while (/* CONSTCOND */ 1) {
 
 		/*
@@ -873,19 +881,20 @@ uvmpd_scan_queue(struct uvm_pggroup *grp
 #endif /* defined(VMSWAP) */
 		    >= grp->pgrp_freetarg << 2 ||
 		    dirtyreacts == UVMPD_NUMDIRTYREACTS) {
-			UVMHIST_LOG(pdhist,"  [%zd]: met free target (%u + %u >= %u): "
-			    "exit loop", grp - uvm.pggroups,
-			    grp->pgrp_free, grp->pgrp_paging,
-			    grp->pgrp_freetarg << 2);
+			UVMHIST_LOG(pdhist,"  [%zd]: met free target (%u + %u)"
+			    ", dirty reacts %u",
+			    grp - uvm.pggroups, grp->pgrp_free,
+			    grp->pgrp_paging, dirtyreacts);
 			break;
 		}
 
 		pg = uvmpdpol_selectvictim(grp);
 		if (pg == NULL) {
-			UVMHIST_LOG(pdhist,"  [%zd]: selectvictim didn't: "
-			    "exit loop", grp - uvm.pggroups, 0, 0, 0);
+			UVMHIST_LOG(pdhist,"  [%zd]: selectvictim didn't",
+			    grp - uvm.pggroups, 0, 0, 0);
 			break;
 		}
+		victims++;
 		KASSERT(uvmpdpol_pageisqueued_p(pg));
 		KASSERT(pg->wire_count == 0);
 
@@ -932,7 +941,7 @@ uvmpd_scan_queue(struct uvm_pggroup *grp
 		}
 		if (pg->flags & PG_BUSY) {
 			mutex_exit(slock);
-			grp->pgrp_pdbusy++;
+			busy++;
 			continue;
 		}
 
@@ -967,6 +976,7 @@ uvmpd_scan_queue(struct uvm_pggroup *grp
 			mutex_exit(&uvm_pageqlock);
 			(void) (uobj->pgops->pgo_put)(uobj, pg->offset,
 			    pg->offset + PAGE_SIZE, PGO_CLEANIT|PGO_FREE);
+			grp->pgrp_pdputs++;
 			mutex_enter(&uvm_pageqlock);
 			continue;
 		}
@@ -989,7 +999,7 @@ uvmpd_scan_queue(struct uvm_pggroup *grp
 			pageidx = pg->offset >> PAGE_SHIFT;
 			KASSERT(!uvmpdpol_pageisqueued_p(pg));
 			uvm_pagefree(pg);
-			grp->pgrp_pdfreed++;
+			freed++;
 
 			/*
 			 * for anons, we need to remove the page
@@ -1096,6 +1106,14 @@ uvmpd_scan_queue(struct uvm_pggroup *grp
 #endif /* defined(VMSWAP) */
 	}
 
+	UVMHIST_LOG(pdhist,"  [%zd] <-- done: %u victims: %u freed, %u busy",
+	    grp - uvm.pggroups, victims, freed, busy);
+
+	grp->pgrp_pdvictims += victims;
+	grp->pgrp_pdnullscans += (victims == 0);
+	grp->pgrp_pdfreed += freed;
+	grp->pgrp_pdbusy += busy;
+
 #if defined(VMSWAP)
 	mutex_exit(&uvm_pageqlock);
 	swapcluster_flush(grp, &swc, true);

Index: src/sys/uvm/uvm_pglist.h
diff -u src/sys/uvm/uvm_pglist.h:1.7.16.4 src/sys/uvm/uvm_pglist.h:1.7.16.5
--- src/sys/uvm/uvm_pglist.h:1.7.16.4	Thu Feb  9 03:05:01 2012
+++ src/sys/uvm/uvm_pglist.h	Thu Feb 16 04:20:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.h,v 1.7.16.4 2012/02/09 03:05:01 matt Exp $	*/
+/*	$NetBSD: uvm_pglist.h,v 1.7.16.5 2012/02/16 04:20:46 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -55,6 +55,8 @@ LIST_HEAD(pgflist, vm_page);
 struct pgfreelist {
 	u_long pgfl_pages[PGFL_NQUEUES];
 	struct pgflist pgfl_queues[VM_NFREELIST][PGFL_NQUEUES];
+	struct uvm_pggroup *pgfl_pggroups[VM_NFREELIST];
+	struct uvm_pggroup *pgfl_hint;
 
 	/* pagealloc counters */
 	uint64_t pgfl_colorfail;/* pagealloc where we got no page */

Index: src/sys/uvm/uvm_stat.c
diff -u src/sys/uvm/uvm_stat.c:1.31.12.2 src/sys/uvm/uvm_stat.c:1.31.12.3
--- src/sys/uvm/uvm_stat.c:1.31.12.2	Thu Feb  9 03:05:01 2012
+++ src/sys/uvm/uvm_stat.c	Thu Feb 16 04:20:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_stat.c,v 1.31.12.2 2012/02/09 03:05:01 matt Exp $	 */
+/*	$NetBSD: uvm_stat.c,v 1.31.12.3 2012/02/16 04:20:46 matt Exp $	 */
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_stat.c,v 1.31.12.2 2012/02/09 03:05:01 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_stat.c,v 1.31.12.3 2012/02/16 04:20:46 matt Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_readahead.h"
@@ -237,6 +237,8 @@ uvmexp_print(void (*pr)(const char *, ..
 			    grp->pgrp_active, grp->pgrp_inactive,
 			    grp->pgrp_kmempages, grp->pgrp_anonpages,
 			    grp->pgrp_filepages, grp->pgrp_execpages);
+			(*pr)("        hints=%"PRIu64" (failed=%"PRIu64")\n",
+			    grp->pgrp_hints, grp->pgrp_hintfails);
 		} else {
 			(*pr)("  active=%u, inactive=%u\n",
 			    grp->pgrp_active, grp->pgrp_inactive);
@@ -296,15 +298,22 @@ uvmexp_print(void (*pr)(const char *, ..
 	(*pr)("    woke=%d\n", uvmexp.pdwoke);
 	STAILQ_FOREACH(grp, &uvm.page_groups, pgrp_uvm_link) {
 		(*pr)("   group#%zd\n", grp - uvm.pggroups);
-		(*pr)("    revs=%"PRIu64", scans=%"PRIu64
-		    ", obscans=%"PRIu64", anscans=%"PRIu64"\n",
-		    grp->pgrp_pdrevs, grp->pgrp_pdscans,
+		(*pr)("    revs=%"PRIu64
+		    ", scans=%"PRIu64
+		    " (null=%"PRIu64
+		    ", obj=%"PRIu64
+		    ", anon=%"PRIu64")\n",
+		    grp->pgrp_pdrevs, grp->pgrp_pdscans, grp->pgrp_pdnullscans,
 		    grp->pgrp_pdobscan, grp->pgrp_pdanscan);
-		(*pr)("    busy=%"PRIu64", freed=%"PRIu64", reactivate=%"PRIu64
+		(*pr)("    victims=%"PRIu64
+		    ", busy=%"PRIu64
+		    ", freed=%"PRIu64
+		    ", reactivate=%"PRIu64
 		    ", deactivate=%"PRIu64"\n",
-		    grp->pgrp_pdbusy, grp->pgrp_pdfreed, grp->pgrp_pdreact,
-		    grp->pgrp_pddeact);
-		(*pr)("    pageouts=%"PRIu64", pending=%"PRIu64
+		    grp->pgrp_pdvictims, grp->pgrp_pdbusy, grp->pgrp_pdfreed,
+		    grp->pgrp_pdreact, grp->pgrp_pddeact);
+		(*pr)("    pageouts=%"PRIu64
+		    ", pending=%"PRIu64
 		    ", paging=%"PRIu64"\n",
 		    grp->pgrp_pdpageouts, grp->pgrp_pdpending,
 		    grp->pgrp_paging);

Reply via email to