Add the number of page colors to uvmexp.
This commit is contained in:
parent
7141c87f89
commit
01e2971ba2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uvm_extern.h,v 1.60 2001/04/29 04:23:21 thorpej Exp $ */
|
||||
/* $NetBSD: uvm_extern.h,v 1.61 2001/05/01 19:36:56 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -310,6 +310,7 @@ struct uvmexp {
|
||||
aborted */
|
||||
int colorhit; /* pagealloc where we got optimal color */
|
||||
int colormiss; /* pagealloc where we didn't */
|
||||
int ncolors; /* number of page color buckets */
|
||||
|
||||
/* fault subcounters */
|
||||
int fltnoram; /* number of times fault was out of ram */
|
||||
@ -435,6 +436,7 @@ struct uvmexp_sysctl {
|
||||
int64_t vtextpages;
|
||||
int64_t colorhit;
|
||||
int64_t colormiss;
|
||||
int64_t ncolors;
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uvm_page.c,v 1.58 2001/05/01 14:02:56 enami Exp $ */
|
||||
/* $NetBSD: uvm_page.c,v 1.59 2001/05/01 19:36:57 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Charles D. Cranor and Washington University.
|
||||
@ -221,6 +221,7 @@ uvm_page_init(kvm_startp, kvm_endp)
|
||||
* init the page queues and page queue locks
|
||||
*/
|
||||
|
||||
uvmexp.ncolors = VM_PGCOLOR_BUCKETS;
|
||||
for (lcv = 0; lcv < VM_NFREELIST; lcv++) {
|
||||
for (color = 0; color < VM_PGCOLOR_BUCKETS; color++) {
|
||||
for (i = 0; i < PGFL_NQUEUES; i++) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmstat.c,v 1.79 2001/04/29 05:56:47 thorpej Exp $ */
|
||||
/* $NetBSD: vmstat.c,v 1.80 2001/05/01 19:36:58 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@ -80,7 +80,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1991, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: vmstat.c,v 1.79 2001/04/29 05:56:47 thorpej Exp $");
|
||||
__RCSID("$NetBSD: vmstat.c,v 1.80 2001/05/01 19:36:58 thorpej Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -605,6 +605,8 @@ dosum(void)
|
||||
uvmexp.colorhit);
|
||||
(void)printf("%9u pagealloc desired color not avail\n",
|
||||
uvmexp.colormiss);
|
||||
(void)printf("%9u page color%s\n",
|
||||
uvmexp.ncolors, uvmexp.ncolors == 1 ? "" : "s");
|
||||
|
||||
(void)printf("%9u faults with no memory\n", uvmexp.fltnoram);
|
||||
(void)printf("%9u faults with no anons\n", uvmexp.fltnoanon);
|
||||
|
Loading…
Reference in New Issue
Block a user