~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/netfs/fscache_stats.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-or-later
  2 /* FS-Cache statistics
  3  *
  4  * Copyright (C) 2021 Red Hat, Inc. All Rights Reserved.
  5  * Written by David Howells (dhowells@redhat.com)
  6  */
  7 
  8 #define FSCACHE_DEBUG_LEVEL CACHE
  9 #include <linux/proc_fs.h>
 10 #include <linux/seq_file.h>
 11 #include "internal.h"
 12 
 13 /*
 14  * operation counters
 15  */
 16 atomic_t fscache_n_volumes;
 17 atomic_t fscache_n_volumes_collision;
 18 atomic_t fscache_n_volumes_nomem;
 19 atomic_t fscache_n_cookies;
 20 atomic_t fscache_n_cookies_lru;
 21 atomic_t fscache_n_cookies_lru_expired;
 22 atomic_t fscache_n_cookies_lru_removed;
 23 atomic_t fscache_n_cookies_lru_dropped;
 24 
 25 atomic_t fscache_n_acquires;
 26 atomic_t fscache_n_acquires_ok;
 27 atomic_t fscache_n_acquires_oom;
 28 
 29 atomic_t fscache_n_invalidates;
 30 
 31 atomic_t fscache_n_updates;
 32 EXPORT_SYMBOL(fscache_n_updates);
 33 
 34 atomic_t fscache_n_relinquishes;
 35 atomic_t fscache_n_relinquishes_retire;
 36 atomic_t fscache_n_relinquishes_dropped;
 37 
 38 atomic_t fscache_n_resizes;
 39 atomic_t fscache_n_resizes_null;
 40 
 41 atomic_t fscache_n_read;
 42 EXPORT_SYMBOL(fscache_n_read);
 43 atomic_t fscache_n_write;
 44 EXPORT_SYMBOL(fscache_n_write);
 45 atomic_t fscache_n_no_write_space;
 46 EXPORT_SYMBOL(fscache_n_no_write_space);
 47 atomic_t fscache_n_no_create_space;
 48 EXPORT_SYMBOL(fscache_n_no_create_space);
 49 atomic_t fscache_n_culled;
 50 EXPORT_SYMBOL(fscache_n_culled);
 51 atomic_t fscache_n_dio_misfit;
 52 EXPORT_SYMBOL(fscache_n_dio_misfit);
 53 
 54 /*
 55  * display the general statistics
 56  */
 57 int fscache_stats_show(struct seq_file *m)
 58 {
 59         seq_puts(m, "-- FS-Cache statistics --\n");
 60         seq_printf(m, "Cookies: n=%d v=%d vcol=%u voom=%u\n",
 61                    atomic_read(&fscache_n_cookies),
 62                    atomic_read(&fscache_n_volumes),
 63                    atomic_read(&fscache_n_volumes_collision),
 64                    atomic_read(&fscache_n_volumes_nomem)
 65                    );
 66 
 67         seq_printf(m, "Acquire: n=%u ok=%u oom=%u\n",
 68                    atomic_read(&fscache_n_acquires),
 69                    atomic_read(&fscache_n_acquires_ok),
 70                    atomic_read(&fscache_n_acquires_oom));
 71 
 72         seq_printf(m, "LRU    : n=%u exp=%u rmv=%u drp=%u at=%ld\n",
 73                    atomic_read(&fscache_n_cookies_lru),
 74                    atomic_read(&fscache_n_cookies_lru_expired),
 75                    atomic_read(&fscache_n_cookies_lru_removed),
 76                    atomic_read(&fscache_n_cookies_lru_dropped),
 77                    timer_pending(&fscache_cookie_lru_timer) ?
 78                    fscache_cookie_lru_timer.expires - jiffies : 0);
 79 
 80         seq_printf(m, "Invals : n=%u\n",
 81                    atomic_read(&fscache_n_invalidates));
 82 
 83         seq_printf(m, "Updates: n=%u rsz=%u rsn=%u\n",
 84                    atomic_read(&fscache_n_updates),
 85                    atomic_read(&fscache_n_resizes),
 86                    atomic_read(&fscache_n_resizes_null));
 87 
 88         seq_printf(m, "Relinqs: n=%u rtr=%u drop=%u\n",
 89                    atomic_read(&fscache_n_relinquishes),
 90                    atomic_read(&fscache_n_relinquishes_retire),
 91                    atomic_read(&fscache_n_relinquishes_dropped));
 92 
 93         seq_printf(m, "NoSpace: nwr=%u ncr=%u cull=%u\n",
 94                    atomic_read(&fscache_n_no_write_space),
 95                    atomic_read(&fscache_n_no_create_space),
 96                    atomic_read(&fscache_n_culled));
 97 
 98         seq_printf(m, "IO     : rd=%u wr=%u mis=%u\n",
 99                    atomic_read(&fscache_n_read),
100                    atomic_read(&fscache_n_write),
101                    atomic_read(&fscache_n_dio_misfit));
102         return 0;
103 }
104 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php