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