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

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

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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 /* Netfs support statistics
  3  *
  4  * Copyright (C) 2021 Red Hat, Inc. All Rights Reserved.
  5  * Written by David Howells (dhowells@redhat.com)
  6  */
  7 
  8 #include <linux/export.h>
  9 #include <linux/seq_file.h>
 10 #include "internal.h"
 11 
 12 atomic_t netfs_n_rh_dio_read;
 13 atomic_t netfs_n_rh_readahead;
 14 atomic_t netfs_n_rh_read_folio;
 15 atomic_t netfs_n_rh_rreq;
 16 atomic_t netfs_n_rh_sreq;
 17 atomic_t netfs_n_rh_download;
 18 atomic_t netfs_n_rh_download_done;
 19 atomic_t netfs_n_rh_download_failed;
 20 atomic_t netfs_n_rh_download_instead;
 21 atomic_t netfs_n_rh_read;
 22 atomic_t netfs_n_rh_read_done;
 23 atomic_t netfs_n_rh_read_failed;
 24 atomic_t netfs_n_rh_zero;
 25 atomic_t netfs_n_rh_short_read;
 26 atomic_t netfs_n_rh_write;
 27 atomic_t netfs_n_rh_write_begin;
 28 atomic_t netfs_n_rh_write_done;
 29 atomic_t netfs_n_rh_write_failed;
 30 atomic_t netfs_n_rh_write_zskip;
 31 atomic_t netfs_n_wh_buffered_write;
 32 atomic_t netfs_n_wh_writethrough;
 33 atomic_t netfs_n_wh_dio_write;
 34 atomic_t netfs_n_wh_writepages;
 35 atomic_t netfs_n_wh_wstream_conflict;
 36 atomic_t netfs_n_wh_upload;
 37 atomic_t netfs_n_wh_upload_done;
 38 atomic_t netfs_n_wh_upload_failed;
 39 atomic_t netfs_n_wh_write;
 40 atomic_t netfs_n_wh_write_done;
 41 atomic_t netfs_n_wh_write_failed;
 42 
 43 int netfs_stats_show(struct seq_file *m, void *v)
 44 {
 45         seq_printf(m, "Netfs  : DR=%u RA=%u RF=%u WB=%u WBZ=%u\n",
 46                    atomic_read(&netfs_n_rh_dio_read),
 47                    atomic_read(&netfs_n_rh_readahead),
 48                    atomic_read(&netfs_n_rh_read_folio),
 49                    atomic_read(&netfs_n_rh_write_begin),
 50                    atomic_read(&netfs_n_rh_write_zskip));
 51         seq_printf(m, "Netfs  : BW=%u WT=%u DW=%u WP=%u\n",
 52                    atomic_read(&netfs_n_wh_buffered_write),
 53                    atomic_read(&netfs_n_wh_writethrough),
 54                    atomic_read(&netfs_n_wh_dio_write),
 55                    atomic_read(&netfs_n_wh_writepages));
 56         seq_printf(m, "Netfs  : ZR=%u sh=%u sk=%u\n",
 57                    atomic_read(&netfs_n_rh_zero),
 58                    atomic_read(&netfs_n_rh_short_read),
 59                    atomic_read(&netfs_n_rh_write_zskip));
 60         seq_printf(m, "Netfs  : DL=%u ds=%u df=%u di=%u\n",
 61                    atomic_read(&netfs_n_rh_download),
 62                    atomic_read(&netfs_n_rh_download_done),
 63                    atomic_read(&netfs_n_rh_download_failed),
 64                    atomic_read(&netfs_n_rh_download_instead));
 65         seq_printf(m, "Netfs  : RD=%u rs=%u rf=%u\n",
 66                    atomic_read(&netfs_n_rh_read),
 67                    atomic_read(&netfs_n_rh_read_done),
 68                    atomic_read(&netfs_n_rh_read_failed));
 69         seq_printf(m, "Netfs  : UL=%u us=%u uf=%u\n",
 70                    atomic_read(&netfs_n_wh_upload),
 71                    atomic_read(&netfs_n_wh_upload_done),
 72                    atomic_read(&netfs_n_wh_upload_failed));
 73         seq_printf(m, "Netfs  : WR=%u ws=%u wf=%u\n",
 74                    atomic_read(&netfs_n_wh_write),
 75                    atomic_read(&netfs_n_wh_write_done),
 76                    atomic_read(&netfs_n_wh_write_failed));
 77         seq_printf(m, "Netfs  : rr=%u sr=%u wsc=%u\n",
 78                    atomic_read(&netfs_n_rh_rreq),
 79                    atomic_read(&netfs_n_rh_sreq),
 80                    atomic_read(&netfs_n_wh_wstream_conflict));
 81         return fscache_stats_show(m);
 82 }
 83 EXPORT_SYMBOL(netfs_stats_show);
 84 

~ [ 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