|
|
| version 1.34, 2004/05/19 22:52:58 | version 1.35, 2004/05/21 15:41:23 |
|---|---|
| Line 511 dounmount(struct mount *mp, int flags, s | Line 511 dounmount(struct mount *mp, int flags, s |
| #ifdef DEBUG | #ifdef DEBUG |
| static int syncprt = 0; | static int syncprt = 0; |
| SYSCTL_INT(_debug, OID_AUTO, syncprt, CTLFLAG_RW, &syncprt, 0, ""); | SYSCTL_INT(_debug, OID_AUTO, syncprt, CTLFLAG_RW, &syncprt, 0, ""); |
| #endif | #endif /* DEBUG */ |
| /* ARGSUSED */ | /* ARGSUSED */ |
| int | int |
| Line 540 sync(struct sync_args *uap) | Line 540 sync(struct sync_args *uap) |
| vfs_unbusy(mp, td); | vfs_unbusy(mp, td); |
| } | } |
| lwkt_reltoken(&ilock); | lwkt_reltoken(&ilock); |
| #if 0 | |
| /* | /* |
| * XXX don't call vfs_bufstats() yet because that routine | * print out buffer pool stat information on each sync() call. |
| * was not imported in the Lite2 merge. | |
| */ | */ |
| #ifdef DIAGNOSTIC | #ifdef DEBUG |
| if (syncprt) | if (syncprt) |
| vfs_bufstats(); | vfs_bufstats(); |
| #endif /* DIAGNOSTIC */ | #endif /* DEBUG */ |
| #endif | |
| return (0); | return (0); |
| } | } |
| Line 3216 extattr_delete_file(struct extattr_delet | Line 3213 extattr_delete_file(struct extattr_delet |
| NDFREE(&nd, 0); | NDFREE(&nd, 0); |
| return(error); | return(error); |
| } | } |
| /* | |
| * print out statistics from the current status of the buffer pool | |
| * this can be toggeled by the system control option debug.syncprt | |
| */ | |
| #ifdef DEBUG | |
| void | |
| vfs_bufstats(void) | |
| { | |
| int s, i, j, count; | |
| struct buf *bp; | |
| struct bqueues *dp; | |
| int counts[(MAXBSIZE / PAGE_SIZE) + 1]; | |
| static char *bname[3] = { "LOCKED", "LRU", "AGE" }; | |
| for (dp = bufqueues, i = 0; dp < &bufqueues[3]; dp++, i++) { | |
| count = 0; | |
| for (j = 0; j <= MAXBSIZE/PAGE_SIZE; j++) | |
| counts[j] = 0; | |
| s = splbio(); | |
| TAILQ_FOREACH(bp, dp, b_freelist) { | |
| counts[bp->b_bufsize/PAGE_SIZE]++; | |
| count++; | |
| } | |
| splx(s); | |
| printf("%s: total-%d", bname[i], count); | |
| for (j = 0; j <= MAXBSIZE/PAGE_SIZE; j++) | |
| if (counts[j] != 0) | |
| printf(", %d-%d", j * PAGE_SIZE, counts[j]); | |
| printf("\n"); | |
| } | |
| } | |
| #endif |