diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-21 22:00:56 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-21 22:00:56 +0000 |
commit | 168660f24dfc46c2702acbe4701a446f42a59578 (patch) | |
tree | f431368afbf6b1b71809cf3fd904d800ea126f4d /fs/nfsd | |
parent | 6420f767924fa73b0ea267864d96820815f4ba5a (diff) |
Merge with Linux 2.4.0-test5-pre3.
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfssvc.c | 3 | ||||
-rw-r--r-- | fs/nfsd/stats.c | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 9a4d12a7d..11297fef5 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -129,7 +129,8 @@ update_thread_usage(int busy_threads) decile = busy_threads*10/nfsdstats.th_cnt; if (decile>0 && decile <= 10) { diff = nfsd_last_call - prev_call; - nfsdstats.th_usage[decile-1] += diff; + if ( (nfsdstats.th_usage[decile-1] += diff) >= NFSD_USAGE_WRAP) + nfsdstats.th_usage[decile-1] -= NFSD_USAGE_WRAP; if (decile == 10) nfsdstats.th_fullcnt++; } diff --git a/fs/nfsd/stats.c b/fs/nfsd/stats.c index 254242fb6..2bcffc4ee 100644 --- a/fs/nfsd/stats.c +++ b/fs/nfsd/stats.c @@ -13,7 +13,7 @@ * io <bytes-read> <bytes-writtten> * statistics for IO throughput * th <threads> <fullcnt> <10%-20%> <20%-30%> ... <90%-100%> <100%> - * time (milliseconds) when nfsd thread usage above thresholds + * time (seconds) when nfsd thread usage above thresholds * and number of times that all threads were in use * ra cache-size <10% <20% <30% ... <100% not-found * number of times that read-ahead entry was found that deep in @@ -58,8 +58,11 @@ nfsd_proc_read(char *buffer, char **start, off_t offset, int count, nfsdstats.io_write); /* thread usage: */ len += sprintf(buffer+len, "th %u %u", nfsdstats.th_cnt, nfsdstats.th_fullcnt); - for (i=0; i<10; i++) - len += sprintf(buffer+len, " %u", nfsdstats.th_usage[i]); + for (i=0; i<10; i++) { + unsigned int jifs = nfsdstats.th_usage[i]; + unsigned int sec = jifs / HZ, msec = (jifs % HZ)*1000/HZ; + len += sprintf(buffer+len, " %u.%03u", sec, msec); + } /* newline and ra-cache */ len += sprintf(buffer+len, "\nra %u", nfsdstats.ra_size); |