diff options
author | David Howells <dhowells@redhat.com> | 2015-02-19 23:47:31 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2015-02-24 10:05:27 +0000 |
commit | 182d919b84902eece162c63ed3d476c8016b4197 (patch) | |
tree | c2f02f26cdcaa4718121c94e8b050a598fab5f8c /fs/fscache/stats.c | |
parent | b2b89ebfc0f0287e20516a5443d93af309b800cf (diff) | |
download | linux-182d919b84902eece162c63ed3d476c8016b4197.tar.bz2 |
FS-Cache: Count culled objects and objects rejected due to lack of space
Count the number of objects that get culled by the cache backend and the
number of objects that the cache backend declines to instantiate due to lack
of space in the cache.
These numbers are made available through /proc/fs/fscache/stats
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Steve Dickson <steved@redhat.com>
Acked-by: Jeff Layton <jeff.layton@primarydata.com>
Diffstat (limited to 'fs/fscache/stats.c')
-rw-r--r-- | fs/fscache/stats.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c index 40d13c70ef51..3a722e8f2307 100644 --- a/fs/fscache/stats.c +++ b/fs/fscache/stats.c @@ -130,6 +130,11 @@ atomic_t fscache_n_cop_write_page; atomic_t fscache_n_cop_uncache_page; atomic_t fscache_n_cop_dissociate_pages; +atomic_t fscache_n_cache_no_space_reject; +atomic_t fscache_n_cache_stale_objects; +atomic_t fscache_n_cache_retired_objects; +atomic_t fscache_n_cache_culled_objects; + /* * display the general statistics */ @@ -271,6 +276,11 @@ static int fscache_stats_show(struct seq_file *m, void *v) atomic_read(&fscache_n_cop_write_page), atomic_read(&fscache_n_cop_uncache_page), atomic_read(&fscache_n_cop_dissociate_pages)); + seq_printf(m, "CacheEv: nsp=%d stl=%d rtr=%d cul=%d\n", + atomic_read(&fscache_n_cache_no_space_reject), + atomic_read(&fscache_n_cache_stale_objects), + atomic_read(&fscache_n_cache_retired_objects), + atomic_read(&fscache_n_cache_culled_objects)); return 0; } |