2874c5fd28426 (Thomas Gleixner 2019-05-27 08:55:01 +0200 1) // SPDX-License-Identifier: GPL-2.0-or-later
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 2) /* FS-Cache statistics
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 3) *
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 4) * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 5) * Written by David Howells (dhowells@redhat.com)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 6) */
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 7)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 8) #define FSCACHE_DEBUG_LEVEL THREAD
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 9) #include <linux/module.h>
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 10) #include <linux/proc_fs.h>
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 11) #include <linux/seq_file.h>
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 12) #include "internal.h"
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 13)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 14) /*
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 15) * operation counters
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 16) */
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 17) atomic_t fscache_n_op_pend;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 18) atomic_t fscache_n_op_run;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 19) atomic_t fscache_n_op_enqueue;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 20) atomic_t fscache_n_op_deferred_release;
03cdd0e4b9a98 (David Howells 2015-02-25 13:21:15 +0000 21) atomic_t fscache_n_op_initialised;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 22) atomic_t fscache_n_op_release;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 23) atomic_t fscache_n_op_gc;
5753c44188925 (David Howells 2009-11-19 18:11:19 +0000 24) atomic_t fscache_n_op_cancelled;
e3d4d28b1c8cc (David Howells 2009-11-19 18:11:32 +0000 25) atomic_t fscache_n_op_rejected;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 26)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 27) atomic_t fscache_n_attr_changed;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 28) atomic_t fscache_n_attr_changed_ok;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 29) atomic_t fscache_n_attr_changed_nobufs;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 30) atomic_t fscache_n_attr_changed_nomem;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 31) atomic_t fscache_n_attr_changed_calls;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 32)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 33) atomic_t fscache_n_allocs;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 34) atomic_t fscache_n_allocs_ok;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 35) atomic_t fscache_n_allocs_wait;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 36) atomic_t fscache_n_allocs_nobufs;
5753c44188925 (David Howells 2009-11-19 18:11:19 +0000 37) atomic_t fscache_n_allocs_intr;
60d543ca724be (David Howells 2009-11-19 18:11:45 +0000 38) atomic_t fscache_n_allocs_object_dead;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 39) atomic_t fscache_n_alloc_ops;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 40) atomic_t fscache_n_alloc_op_waits;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 41)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 42) atomic_t fscache_n_retrievals;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 43) atomic_t fscache_n_retrievals_ok;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 44) atomic_t fscache_n_retrievals_wait;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 45) atomic_t fscache_n_retrievals_nodata;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 46) atomic_t fscache_n_retrievals_nobufs;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 47) atomic_t fscache_n_retrievals_intr;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 48) atomic_t fscache_n_retrievals_nomem;
60d543ca724be (David Howells 2009-11-19 18:11:45 +0000 49) atomic_t fscache_n_retrievals_object_dead;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 50) atomic_t fscache_n_retrieval_ops;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 51) atomic_t fscache_n_retrieval_op_waits;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 52)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 53) atomic_t fscache_n_stores;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 54) atomic_t fscache_n_stores_ok;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 55) atomic_t fscache_n_stores_again;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 56) atomic_t fscache_n_stores_nobufs;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 57) atomic_t fscache_n_stores_oom;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 58) atomic_t fscache_n_store_ops;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 59) atomic_t fscache_n_store_calls;
1bccf513ac49d (David Howells 2009-11-19 18:11:25 +0000 60) atomic_t fscache_n_store_pages;
1bccf513ac49d (David Howells 2009-11-19 18:11:25 +0000 61) atomic_t fscache_n_store_radix_deletes;
1bccf513ac49d (David Howells 2009-11-19 18:11:25 +0000 62) atomic_t fscache_n_store_pages_over_limit;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 63)
201a15428bd54 (David Howells 2009-11-19 18:11:35 +0000 64) atomic_t fscache_n_store_vmscan_not_storing;
201a15428bd54 (David Howells 2009-11-19 18:11:35 +0000 65) atomic_t fscache_n_store_vmscan_gone;
201a15428bd54 (David Howells 2009-11-19 18:11:35 +0000 66) atomic_t fscache_n_store_vmscan_busy;
201a15428bd54 (David Howells 2009-11-19 18:11:35 +0000 67) atomic_t fscache_n_store_vmscan_cancelled;
8c209ce721444 (David Howells 2012-12-05 13:34:49 +0000 68) atomic_t fscache_n_store_vmscan_wait;
201a15428bd54 (David Howells 2009-11-19 18:11:35 +0000 69)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 70) atomic_t fscache_n_marks;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 71) atomic_t fscache_n_uncaches;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 72)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 73) atomic_t fscache_n_acquires;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 74) atomic_t fscache_n_acquires_null;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 75) atomic_t fscache_n_acquires_no_cache;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 76) atomic_t fscache_n_acquires_ok;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 77) atomic_t fscache_n_acquires_nobufs;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 78) atomic_t fscache_n_acquires_oom;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 79)
ef778e7ae67cd (David Howells 2012-12-20 21:52:36 +0000 80) atomic_t fscache_n_invalidates;
ef778e7ae67cd (David Howells 2012-12-20 21:52:36 +0000 81) atomic_t fscache_n_invalidates_run;
ef778e7ae67cd (David Howells 2012-12-20 21:52:36 +0000 82)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 83) atomic_t fscache_n_updates;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 84) atomic_t fscache_n_updates_null;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 85) atomic_t fscache_n_updates_run;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 86)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 87) atomic_t fscache_n_relinquishes;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 88) atomic_t fscache_n_relinquishes_null;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 89) atomic_t fscache_n_relinquishes_waitcrt;
2175bb06dc6cf (David Howells 2009-11-19 18:11:38 +0000 90) atomic_t fscache_n_relinquishes_retire;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 91)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 92) atomic_t fscache_n_cookie_index;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 93) atomic_t fscache_n_cookie_data;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 94) atomic_t fscache_n_cookie_special;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 95)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 96) atomic_t fscache_n_object_alloc;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 97) atomic_t fscache_n_object_no_alloc;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 98) atomic_t fscache_n_object_lookups;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 99) atomic_t fscache_n_object_lookups_negative;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 100) atomic_t fscache_n_object_lookups_positive;
fee096deb4f33 (David Howells 2009-11-19 18:12:05 +0000 101) atomic_t fscache_n_object_lookups_timed_out;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 102) atomic_t fscache_n_object_created;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 103) atomic_t fscache_n_object_avail;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 104) atomic_t fscache_n_object_dead;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 105)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 106) atomic_t fscache_n_checkaux_none;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 107) atomic_t fscache_n_checkaux_okay;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 108) atomic_t fscache_n_checkaux_update;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 109) atomic_t fscache_n_checkaux_obsolete;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 110)
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 111) atomic_t fscache_n_cop_alloc_object;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 112) atomic_t fscache_n_cop_lookup_object;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 113) atomic_t fscache_n_cop_lookup_complete;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 114) atomic_t fscache_n_cop_grab_object;
ef778e7ae67cd (David Howells 2012-12-20 21:52:36 +0000 115) atomic_t fscache_n_cop_invalidate_object;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 116) atomic_t fscache_n_cop_update_object;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 117) atomic_t fscache_n_cop_drop_object;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 118) atomic_t fscache_n_cop_put_object;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 119) atomic_t fscache_n_cop_sync_cache;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 120) atomic_t fscache_n_cop_attr_changed;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 121) atomic_t fscache_n_cop_read_or_alloc_page;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 122) atomic_t fscache_n_cop_read_or_alloc_pages;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 123) atomic_t fscache_n_cop_allocate_page;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 124) atomic_t fscache_n_cop_allocate_pages;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 125) atomic_t fscache_n_cop_write_page;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 126) atomic_t fscache_n_cop_uncache_page;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 127) atomic_t fscache_n_cop_dissociate_pages;
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 128)
182d919b84902 (David Howells 2015-02-19 23:47:31 +0000 129) atomic_t fscache_n_cache_no_space_reject;
182d919b84902 (David Howells 2015-02-19 23:47:31 +0000 130) atomic_t fscache_n_cache_stale_objects;
182d919b84902 (David Howells 2015-02-19 23:47:31 +0000 131) atomic_t fscache_n_cache_retired_objects;
182d919b84902 (David Howells 2015-02-19 23:47:31 +0000 132) atomic_t fscache_n_cache_culled_objects;
182d919b84902 (David Howells 2015-02-19 23:47:31 +0000 133)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 134) /*
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 135) * display the general statistics
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 136) */
3f3942aca6da3 (Christoph Hellwig 2018-05-15 15:57:23 +0200 137) int fscache_stats_show(struct seq_file *m, void *v)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 138) {
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 139) seq_puts(m, "FS-Cache statistics\n");
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 140)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 141) seq_printf(m, "Cookies: idx=%u dat=%u spc=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 142) atomic_read(&fscache_n_cookie_index),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 143) atomic_read(&fscache_n_cookie_data),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 144) atomic_read(&fscache_n_cookie_special));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 145)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 146) seq_printf(m, "Objects: alc=%u nal=%u avl=%u ded=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 147) atomic_read(&fscache_n_object_alloc),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 148) atomic_read(&fscache_n_object_no_alloc),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 149) atomic_read(&fscache_n_object_avail),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 150) atomic_read(&fscache_n_object_dead));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 151) seq_printf(m, "ChkAux : non=%u ok=%u upd=%u obs=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 152) atomic_read(&fscache_n_checkaux_none),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 153) atomic_read(&fscache_n_checkaux_okay),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 154) atomic_read(&fscache_n_checkaux_update),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 155) atomic_read(&fscache_n_checkaux_obsolete));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 156)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 157) seq_printf(m, "Pages : mrk=%u unc=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 158) atomic_read(&fscache_n_marks),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 159) atomic_read(&fscache_n_uncaches));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 160)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 161) seq_printf(m, "Acquire: n=%u nul=%u noc=%u ok=%u nbf=%u"
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 162) " oom=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 163) atomic_read(&fscache_n_acquires),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 164) atomic_read(&fscache_n_acquires_null),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 165) atomic_read(&fscache_n_acquires_no_cache),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 166) atomic_read(&fscache_n_acquires_ok),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 167) atomic_read(&fscache_n_acquires_nobufs),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 168) atomic_read(&fscache_n_acquires_oom));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 169)
fee096deb4f33 (David Howells 2009-11-19 18:12:05 +0000 170) seq_printf(m, "Lookups: n=%u neg=%u pos=%u crt=%u tmo=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 171) atomic_read(&fscache_n_object_lookups),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 172) atomic_read(&fscache_n_object_lookups_negative),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 173) atomic_read(&fscache_n_object_lookups_positive),
cc4fc29e59c38 (David Howells 2010-04-06 14:35:09 -0700 174) atomic_read(&fscache_n_object_created),
cc4fc29e59c38 (David Howells 2010-04-06 14:35:09 -0700 175) atomic_read(&fscache_n_object_lookups_timed_out));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 176)
ef778e7ae67cd (David Howells 2012-12-20 21:52:36 +0000 177) seq_printf(m, "Invals : n=%u run=%u\n",
ef778e7ae67cd (David Howells 2012-12-20 21:52:36 +0000 178) atomic_read(&fscache_n_invalidates),
ef778e7ae67cd (David Howells 2012-12-20 21:52:36 +0000 179) atomic_read(&fscache_n_invalidates_run));
ef778e7ae67cd (David Howells 2012-12-20 21:52:36 +0000 180)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 181) seq_printf(m, "Updates: n=%u nul=%u run=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 182) atomic_read(&fscache_n_updates),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 183) atomic_read(&fscache_n_updates_null),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 184) atomic_read(&fscache_n_updates_run));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 185)
2175bb06dc6cf (David Howells 2009-11-19 18:11:38 +0000 186) seq_printf(m, "Relinqs: n=%u nul=%u wcr=%u rtr=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 187) atomic_read(&fscache_n_relinquishes),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 188) atomic_read(&fscache_n_relinquishes_null),
2175bb06dc6cf (David Howells 2009-11-19 18:11:38 +0000 189) atomic_read(&fscache_n_relinquishes_waitcrt),
2175bb06dc6cf (David Howells 2009-11-19 18:11:38 +0000 190) atomic_read(&fscache_n_relinquishes_retire));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 191)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 192) seq_printf(m, "AttrChg: n=%u ok=%u nbf=%u oom=%u run=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 193) atomic_read(&fscache_n_attr_changed),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 194) atomic_read(&fscache_n_attr_changed_ok),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 195) atomic_read(&fscache_n_attr_changed_nobufs),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 196) atomic_read(&fscache_n_attr_changed_nomem),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 197) atomic_read(&fscache_n_attr_changed_calls));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 198)
5753c44188925 (David Howells 2009-11-19 18:11:19 +0000 199) seq_printf(m, "Allocs : n=%u ok=%u wt=%u nbf=%u int=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 200) atomic_read(&fscache_n_allocs),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 201) atomic_read(&fscache_n_allocs_ok),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 202) atomic_read(&fscache_n_allocs_wait),
5753c44188925 (David Howells 2009-11-19 18:11:19 +0000 203) atomic_read(&fscache_n_allocs_nobufs),
5753c44188925 (David Howells 2009-11-19 18:11:19 +0000 204) atomic_read(&fscache_n_allocs_intr));
60d543ca724be (David Howells 2009-11-19 18:11:45 +0000 205) seq_printf(m, "Allocs : ops=%u owt=%u abt=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 206) atomic_read(&fscache_n_alloc_ops),
60d543ca724be (David Howells 2009-11-19 18:11:45 +0000 207) atomic_read(&fscache_n_alloc_op_waits),
60d543ca724be (David Howells 2009-11-19 18:11:45 +0000 208) atomic_read(&fscache_n_allocs_object_dead));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 209)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 210) seq_printf(m, "Retrvls: n=%u ok=%u wt=%u nod=%u nbf=%u"
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 211) " int=%u oom=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 212) atomic_read(&fscache_n_retrievals),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 213) atomic_read(&fscache_n_retrievals_ok),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 214) atomic_read(&fscache_n_retrievals_wait),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 215) atomic_read(&fscache_n_retrievals_nodata),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 216) atomic_read(&fscache_n_retrievals_nobufs),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 217) atomic_read(&fscache_n_retrievals_intr),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 218) atomic_read(&fscache_n_retrievals_nomem));
60d543ca724be (David Howells 2009-11-19 18:11:45 +0000 219) seq_printf(m, "Retrvls: ops=%u owt=%u abt=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 220) atomic_read(&fscache_n_retrieval_ops),
60d543ca724be (David Howells 2009-11-19 18:11:45 +0000 221) atomic_read(&fscache_n_retrieval_op_waits),
60d543ca724be (David Howells 2009-11-19 18:11:45 +0000 222) atomic_read(&fscache_n_retrievals_object_dead));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 223)
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 224) seq_printf(m, "Stores : n=%u ok=%u agn=%u nbf=%u oom=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 225) atomic_read(&fscache_n_stores),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 226) atomic_read(&fscache_n_stores_ok),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 227) atomic_read(&fscache_n_stores_again),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 228) atomic_read(&fscache_n_stores_nobufs),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 229) atomic_read(&fscache_n_stores_oom));
1bccf513ac49d (David Howells 2009-11-19 18:11:25 +0000 230) seq_printf(m, "Stores : ops=%u run=%u pgs=%u rxd=%u olm=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 231) atomic_read(&fscache_n_store_ops),
1bccf513ac49d (David Howells 2009-11-19 18:11:25 +0000 232) atomic_read(&fscache_n_store_calls),
1bccf513ac49d (David Howells 2009-11-19 18:11:25 +0000 233) atomic_read(&fscache_n_store_pages),
1bccf513ac49d (David Howells 2009-11-19 18:11:25 +0000 234) atomic_read(&fscache_n_store_radix_deletes),
1bccf513ac49d (David Howells 2009-11-19 18:11:25 +0000 235) atomic_read(&fscache_n_store_pages_over_limit));
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 236)
8c209ce721444 (David Howells 2012-12-05 13:34:49 +0000 237) seq_printf(m, "VmScan : nos=%u gon=%u bsy=%u can=%u wt=%u\n",
201a15428bd54 (David Howells 2009-11-19 18:11:35 +0000 238) atomic_read(&fscache_n_store_vmscan_not_storing),
201a15428bd54 (David Howells 2009-11-19 18:11:35 +0000 239) atomic_read(&fscache_n_store_vmscan_gone),
201a15428bd54 (David Howells 2009-11-19 18:11:35 +0000 240) atomic_read(&fscache_n_store_vmscan_busy),
8c209ce721444 (David Howells 2012-12-05 13:34:49 +0000 241) atomic_read(&fscache_n_store_vmscan_cancelled),
8c209ce721444 (David Howells 2012-12-05 13:34:49 +0000 242) atomic_read(&fscache_n_store_vmscan_wait));
201a15428bd54 (David Howells 2009-11-19 18:11:35 +0000 243)
e3d4d28b1c8cc (David Howells 2009-11-19 18:11:32 +0000 244) seq_printf(m, "Ops : pend=%u run=%u enq=%u can=%u rej=%u\n",
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 245) atomic_read(&fscache_n_op_pend),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 246) atomic_read(&fscache_n_op_run),
5753c44188925 (David Howells 2009-11-19 18:11:19 +0000 247) atomic_read(&fscache_n_op_enqueue),
e3d4d28b1c8cc (David Howells 2009-11-19 18:11:32 +0000 248) atomic_read(&fscache_n_op_cancelled),
e3d4d28b1c8cc (David Howells 2009-11-19 18:11:32 +0000 249) atomic_read(&fscache_n_op_rejected));
03cdd0e4b9a98 (David Howells 2015-02-25 13:21:15 +0000 250) seq_printf(m, "Ops : ini=%u dfr=%u rel=%u gc=%u\n",
03cdd0e4b9a98 (David Howells 2015-02-25 13:21:15 +0000 251) atomic_read(&fscache_n_op_initialised),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 252) atomic_read(&fscache_n_op_deferred_release),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 253) atomic_read(&fscache_n_op_release),
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 254) atomic_read(&fscache_n_op_gc));
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 255)
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 256) seq_printf(m, "CacheOp: alo=%d luo=%d luc=%d gro=%d\n",
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 257) atomic_read(&fscache_n_cop_alloc_object),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 258) atomic_read(&fscache_n_cop_lookup_object),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 259) atomic_read(&fscache_n_cop_lookup_complete),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 260) atomic_read(&fscache_n_cop_grab_object));
ef778e7ae67cd (David Howells 2012-12-20 21:52:36 +0000 261) seq_printf(m, "CacheOp: inv=%d upo=%d dro=%d pto=%d atc=%d syn=%d\n",
ef778e7ae67cd (David Howells 2012-12-20 21:52:36 +0000 262) atomic_read(&fscache_n_cop_invalidate_object),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 263) atomic_read(&fscache_n_cop_update_object),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 264) atomic_read(&fscache_n_cop_drop_object),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 265) atomic_read(&fscache_n_cop_put_object),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 266) atomic_read(&fscache_n_cop_attr_changed),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 267) atomic_read(&fscache_n_cop_sync_cache));
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 268) seq_printf(m, "CacheOp: rap=%d ras=%d alp=%d als=%d wrp=%d ucp=%d dsp=%d\n",
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 269) atomic_read(&fscache_n_cop_read_or_alloc_page),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 270) atomic_read(&fscache_n_cop_read_or_alloc_pages),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 271) atomic_read(&fscache_n_cop_allocate_page),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 272) atomic_read(&fscache_n_cop_allocate_pages),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 273) atomic_read(&fscache_n_cop_write_page),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 274) atomic_read(&fscache_n_cop_uncache_page),
52bd75fdb135d (David Howells 2009-11-19 18:11:08 +0000 275) atomic_read(&fscache_n_cop_dissociate_pages));
182d919b84902 (David Howells 2015-02-19 23:47:31 +0000 276) seq_printf(m, "CacheEv: nsp=%d stl=%d rtr=%d cul=%d\n",
182d919b84902 (David Howells 2015-02-19 23:47:31 +0000 277) atomic_read(&fscache_n_cache_no_space_reject),
182d919b84902 (David Howells 2015-02-19 23:47:31 +0000 278) atomic_read(&fscache_n_cache_stale_objects),
182d919b84902 (David Howells 2015-02-19 23:47:31 +0000 279) atomic_read(&fscache_n_cache_retired_objects),
182d919b84902 (David Howells 2015-02-19 23:47:31 +0000 280) atomic_read(&fscache_n_cache_culled_objects));
26aaeffcafe6c (David Howells 2021-02-22 11:39:47 +0000 281) netfs_stats_show(m);
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 282) return 0;
7394daa8c61df (David Howells 2009-04-03 16:42:37 +0100 283) }