From: Dave Wysochanski <dwysocha@redhat.com>
To: Anna Schumaker <anna.schumaker@netapp.com>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
David Howells <dhowells@redhat.com>
Cc: linux-nfs@vger.kernel.org, linux-cachefs@redhat.com,
Benjamin Maynard <benmaynard@google.com>,
Daire Byrne <daire.byrne@gmail.com>
Subject: [PATCH v9 4/5] NFS: Remove all NFSIOS_FSCACHE counters due to conversion to netfs API
Date: Mon, 17 Oct 2022 06:52:11 -0400 [thread overview]
Message-ID: <20221017105212.77588-5-dwysocha@redhat.com> (raw)
In-Reply-To: <20221017105212.77588-1-dwysocha@redhat.com>
The old NFSIOS_FSCACHE counters are no longer accurate or useful with
the conversion to the new netfs API. The new API does not have a page
based interface, and so the counters in nfs_stat_fscachecounters are
no longer obtainable. The new netfs the API has extensive statistics
inside /proc/fs/fscache/stats so we no longer need NFS specific fscache
stats.
Note this also removes the 'fsc:' line from /proc/self/mountstats so
it will be a user-visible change.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfs/iostat.h | 17 -----------------
fs/nfs/super.c | 11 -----------
include/linux/nfs_iostat.h | 12 ------------
3 files changed, 40 deletions(-)
diff --git a/fs/nfs/iostat.h b/fs/nfs/iostat.h
index 2ddaab1ac653..5aa776b5a3e7 100644
--- a/fs/nfs/iostat.h
+++ b/fs/nfs/iostat.h
@@ -17,9 +17,6 @@
struct nfs_iostats {
unsigned long long bytes[__NFSIOS_BYTESMAX];
-#ifdef CONFIG_NFS_FSCACHE
- unsigned long long fscache[__NFSIOS_FSCACHEMAX];
-#endif
unsigned long events[__NFSIOS_COUNTSMAX];
} ____cacheline_aligned;
@@ -49,20 +46,6 @@ static inline void nfs_add_stats(const struct inode *inode,
nfs_add_server_stats(NFS_SERVER(inode), stat, addend);
}
-#ifdef CONFIG_NFS_FSCACHE
-static inline void nfs_add_fscache_stats(struct inode *inode,
- enum nfs_stat_fscachecounters stat,
- long addend)
-{
- this_cpu_add(NFS_SERVER(inode)->io_stats->fscache[stat], addend);
-}
-static inline void nfs_inc_fscache_stats(struct inode *inode,
- enum nfs_stat_fscachecounters stat)
-{
- this_cpu_inc(NFS_SERVER(inode)->io_stats->fscache[stat]);
-}
-#endif
-
static inline struct nfs_iostats __percpu *nfs_alloc_iostats(void)
{
return alloc_percpu(struct nfs_iostats);
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index ee66ffdb985e..302148258ff1 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -692,10 +692,6 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
totals.events[i] += stats->events[i];
for (i = 0; i < __NFSIOS_BYTESMAX; i++)
totals.bytes[i] += stats->bytes[i];
-#ifdef CONFIG_NFS_FSCACHE
- for (i = 0; i < __NFSIOS_FSCACHEMAX; i++)
- totals.fscache[i] += stats->fscache[i];
-#endif
preempt_enable();
}
@@ -706,13 +702,6 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
seq_puts(m, "\n\tbytes:\t");
for (i = 0; i < __NFSIOS_BYTESMAX; i++)
seq_printf(m, "%Lu ", totals.bytes[i]);
-#ifdef CONFIG_NFS_FSCACHE
- if (nfss->options & NFS_OPTION_FSCACHE) {
- seq_puts(m, "\n\tfsc:\t");
- for (i = 0; i < __NFSIOS_FSCACHEMAX; i++)
- seq_printf(m, "%Lu ", totals.fscache[i]);
- }
-#endif
seq_putc(m, '\n');
rpc_clnt_show_stats(m, nfss->client);
diff --git a/include/linux/nfs_iostat.h b/include/linux/nfs_iostat.h
index 027874c36c88..8d946089d151 100644
--- a/include/linux/nfs_iostat.h
+++ b/include/linux/nfs_iostat.h
@@ -119,16 +119,4 @@ enum nfs_stat_eventcounters {
__NFSIOS_COUNTSMAX,
};
-/*
- * NFS local caching servicing counters
- */
-enum nfs_stat_fscachecounters {
- NFSIOS_FSCACHE_PAGES_READ_OK,
- NFSIOS_FSCACHE_PAGES_READ_FAIL,
- NFSIOS_FSCACHE_PAGES_WRITTEN_OK,
- NFSIOS_FSCACHE_PAGES_WRITTEN_FAIL,
- NFSIOS_FSCACHE_PAGES_UNCACHED,
- __NFSIOS_FSCACHEMAX,
-};
-
#endif /* _LINUX_NFS_IOSTAT */
--
2.31.1
next prev parent reply other threads:[~2022-10-17 10:52 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 10:52 [PATCH v9 0/5] Convert NFS with fscache to the netfs API Dave Wysochanski
2022-10-17 10:52 ` [PATCH v9 1/5] NFS: Rename readpage_async_filler to nfs_pageio_add_page Dave Wysochanski
2022-10-27 18:07 ` Trond Myklebust
2022-10-28 10:32 ` David Wysochanski
2022-10-28 17:14 ` Trond Myklebust
2022-10-17 10:52 ` [PATCH v9 2/5] NFS: Configure support for netfs when NFS fscache is configured Dave Wysochanski
2022-10-17 10:52 ` [PATCH v9 3/5] NFS: Convert buffered read paths to use netfs when fscache is enabled Dave Wysochanski
2022-10-27 19:16 ` Trond Myklebust
2022-10-28 11:50 ` David Wysochanski
2022-10-28 16:59 ` Trond Myklebust
2022-10-29 16:46 ` David Wysochanski
2022-10-30 23:25 ` David Wysochanski
2022-10-31 17:42 ` Benjamin Maynard
[not found] ` <1B2E1442-EB0A-43E3-96BB-15C717E966E5@hammerspace.com>
2022-11-12 12:46 ` Benjamin Maynard
2022-11-14 10:41 ` David Wysochanski
2022-11-14 12:42 ` Benjamin Maynard
2022-11-14 13:07 ` Jeff Layton
2022-11-14 13:14 ` Benjamin Maynard
2022-11-14 13:53 ` Jeff Layton
2022-11-14 13:33 ` Daire Byrne
2022-11-14 13:46 ` David Wysochanski
2022-11-14 16:03 ` Benjamin Maynard
2022-11-14 17:11 ` Jeff Layton
2022-11-14 17:34 ` David Wysochanski
2022-11-14 21:25 ` Benjamin Maynard
2022-11-17 11:03 ` Daire Byrne
2023-01-03 20:33 ` Benjamin Maynard
2023-02-06 17:32 ` Benjamin Maynard
2023-02-09 15:09 ` David Wysochanski
2022-10-17 10:52 ` Dave Wysochanski [this message]
2022-10-17 10:52 ` [PATCH v9 5/5] NFS: Remove fscache specific trace points and NFS_INO_FSCACHE bit Dave Wysochanski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221017105212.77588-5-dwysocha@redhat.com \
--to=dwysocha@redhat.com \
--cc=anna.schumaker@netapp.com \
--cc=benmaynard@google.com \
--cc=daire.byrne@gmail.com \
--cc=dhowells@redhat.com \
--cc=linux-cachefs@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.