diff options
| author | ad <ad@NetBSD.org> | 2007-12-26 16:01:34 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2007-12-26 16:01:34 +0000 |
| commit | ea3f10f7e0bbec1b91020f8a5f122d418ab2fbcc (patch) | |
| tree | 76b2e7de3e201fd39b888fe4985745e3d166aad8 /usr.bin/vmstat | |
| parent | 890b62431b0627bd148b755191009d3d0b9ca813 (diff) | |
Merge more changes from vmlocking2, mainly:
- Locking improvements.
- Use pool_cache for more items.
Diffstat (limited to 'usr.bin/vmstat')
| -rw-r--r-- | usr.bin/vmstat/vmstat.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 9138e93716d..3c423a71376 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: vmstat.c,v 1.156 2007/12/20 23:49:11 ad Exp $ */ +/* $NetBSD: vmstat.c,v 1.157 2007/12/26 16:01:39 ad Exp $ */ /*- * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -77,7 +77,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.156 2007/12/20 23:49:11 ad Exp $"); +__RCSID("$NetBSD: vmstat.c,v 1.157 2007/12/26 16:01:39 ad Exp $"); #endif #endif /* not lint */ @@ -1177,17 +1177,17 @@ dopool(int verbose, int wide) int first, ovflw; void *addr; long total, inuse, this_total, this_inuse; - LIST_HEAD(,pool) pool_head; + TAILQ_HEAD(,pool) pool_head; struct pool pool, *pp = &pool; struct pool_allocator pa; char name[32], maxp[32]; kread(namelist, X_POOLHEAD, &pool_head, sizeof(pool_head)); - addr = LIST_FIRST(&pool_head); + addr = TAILQ_FIRST(&pool_head); total = inuse = 0; - for (first = 1; addr != NULL; addr = LIST_NEXT(pp, pr_poollist) ) { + for (first = 1; addr != NULL; addr = TAILQ_NEXT(pp, pr_poollist) ) { deref_kptr(addr, pp, sizeof(*pp), "pool chain trashed"); deref_kptr(pp->pr_alloc, &pa, sizeof(pa), "pool allocator trashed"); @@ -1283,7 +1283,7 @@ dopoolcache(void) { struct pool_cache pool_cache, *pc = &pool_cache; pool_cache_cpu_t cache_cpu, *cc = &cache_cpu; - LIST_HEAD(,pool) pool_head; + TAILQ_HEAD(,pool) pool_head; struct pool pool, *pp = &pool; char name[32]; uint64_t cpuhit, cpumiss, tot; @@ -1292,9 +1292,9 @@ dopoolcache(void) double p; kread(namelist, X_POOLHEAD, &pool_head, sizeof(pool_head)); - addr = LIST_FIRST(&pool_head); + addr = TAILQ_FIRST(&pool_head); - for (first = 1; addr != NULL; addr = LIST_NEXT(pp, pr_poollist) ) { + for (first = 1; addr != NULL; addr = TAILQ_NEXT(pp, pr_poollist) ) { deref_kptr(addr, pp, sizeof(*pp), "pool chain trashed"); if (pp->pr_cache == NULL) continue; |
