diff options
| author | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:38 -0500 |
|---|---|---|
| committer | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:38 -0500 |
| commit | 2175bb06dc6cf2af9c098a1770561f9e63edae4e (patch) | |
| tree | 579c8d4b3f4f92efee919953dab2c78cea8c21ea | |
| parent | 201a15428bd54f83eccec8b7c64a04b8f9431204 (diff) | |
FS-Cache: Add a retirement stat counter
Add a stat counter to count retirement events rather than ordinary release
events (the retire argument to fscache_relinquish_cookie()).
Signed-off-by: David Howells <dhowells@redhat.com>
| -rw-r--r-- | fs/fscache/cookie.c | 2 | ||||
| -rw-r--r-- | fs/fscache/internal.h | 1 | ||||
| -rw-r--r-- | fs/fscache/stats.c | 6 |
3 files changed, 7 insertions, 2 deletions
diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c index f979659c1b3f..990535071a8a 100644 --- a/fs/fscache/cookie.c +++ b/fs/fscache/cookie.c | |||
| @@ -415,6 +415,8 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire) | |||
| 415 | unsigned long event; | 415 | unsigned long event; |
| 416 | 416 | ||
| 417 | fscache_stat(&fscache_n_relinquishes); | 417 | fscache_stat(&fscache_n_relinquishes); |
| 418 | if (retire) | ||
| 419 | fscache_stat(&fscache_n_relinquishes_retire); | ||
| 418 | 420 | ||
| 419 | if (!cookie) { | 421 | if (!cookie) { |
| 420 | fscache_stat(&fscache_n_relinquishes_null); | 422 | fscache_stat(&fscache_n_relinquishes_null); |
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h index e5046519b153..2bf463d26080 100644 --- a/fs/fscache/internal.h +++ b/fs/fscache/internal.h | |||
| @@ -202,6 +202,7 @@ extern atomic_t fscache_n_updates_run; | |||
| 202 | extern atomic_t fscache_n_relinquishes; | 202 | extern atomic_t fscache_n_relinquishes; |
| 203 | extern atomic_t fscache_n_relinquishes_null; | 203 | extern atomic_t fscache_n_relinquishes_null; |
| 204 | extern atomic_t fscache_n_relinquishes_waitcrt; | 204 | extern atomic_t fscache_n_relinquishes_waitcrt; |
| 205 | extern atomic_t fscache_n_relinquishes_retire; | ||
| 205 | 206 | ||
| 206 | extern atomic_t fscache_n_cookie_index; | 207 | extern atomic_t fscache_n_cookie_index; |
| 207 | extern atomic_t fscache_n_cookie_data; | 208 | extern atomic_t fscache_n_cookie_data; |
diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c index cda69994e06d..9e15289eb5c1 100644 --- a/fs/fscache/stats.c +++ b/fs/fscache/stats.c | |||
| @@ -85,6 +85,7 @@ atomic_t fscache_n_updates_run; | |||
| 85 | atomic_t fscache_n_relinquishes; | 85 | atomic_t fscache_n_relinquishes; |
| 86 | atomic_t fscache_n_relinquishes_null; | 86 | atomic_t fscache_n_relinquishes_null; |
| 87 | atomic_t fscache_n_relinquishes_waitcrt; | 87 | atomic_t fscache_n_relinquishes_waitcrt; |
| 88 | atomic_t fscache_n_relinquishes_retire; | ||
| 88 | 89 | ||
| 89 | atomic_t fscache_n_cookie_index; | 90 | atomic_t fscache_n_cookie_index; |
| 90 | atomic_t fscache_n_cookie_data; | 91 | atomic_t fscache_n_cookie_data; |
| @@ -168,10 +169,11 @@ static int fscache_stats_show(struct seq_file *m, void *v) | |||
| 168 | atomic_read(&fscache_n_updates_null), | 169 | atomic_read(&fscache_n_updates_null), |
| 169 | atomic_read(&fscache_n_updates_run)); | 170 | atomic_read(&fscache_n_updates_run)); |
| 170 | 171 | ||
| 171 | seq_printf(m, "Relinqs: n=%u nul=%u wcr=%u\n", | 172 | seq_printf(m, "Relinqs: n=%u nul=%u wcr=%u rtr=%u\n", |
| 172 | atomic_read(&fscache_n_relinquishes), | 173 | atomic_read(&fscache_n_relinquishes), |
| 173 | atomic_read(&fscache_n_relinquishes_null), | 174 | atomic_read(&fscache_n_relinquishes_null), |
| 174 | atomic_read(&fscache_n_relinquishes_waitcrt)); | 175 | atomic_read(&fscache_n_relinquishes_waitcrt), |
| 176 | atomic_read(&fscache_n_relinquishes_retire)); | ||
| 175 | 177 | ||
| 176 | seq_printf(m, "AttrChg: n=%u ok=%u nbf=%u oom=%u run=%u\n", | 178 | seq_printf(m, "AttrChg: n=%u ok=%u nbf=%u oom=%u run=%u\n", |
| 177 | atomic_read(&fscache_n_attr_changed), | 179 | atomic_read(&fscache_n_attr_changed), |
