nfsd: remove the pages_flushed statistic from filecache
[ Upstream commit 1f696e230ea5198e393368b319eb55651828d687 ] We're counting mapping->nrpages, but not all of those are necessarily dirty. We don't really have a simple way to count just the dirty pages, so just remove this stat since it's not accurate. Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b4bd3bc3d3
commit
09ea1b1def
1 changed files with 1 additions and 6 deletions
|
@ -57,7 +57,6 @@ static DEFINE_PER_CPU(unsigned long, nfsd_file_cache_hits);
|
||||||
static DEFINE_PER_CPU(unsigned long, nfsd_file_acquisitions);
|
static DEFINE_PER_CPU(unsigned long, nfsd_file_acquisitions);
|
||||||
static DEFINE_PER_CPU(unsigned long, nfsd_file_releases);
|
static DEFINE_PER_CPU(unsigned long, nfsd_file_releases);
|
||||||
static DEFINE_PER_CPU(unsigned long, nfsd_file_total_age);
|
static DEFINE_PER_CPU(unsigned long, nfsd_file_total_age);
|
||||||
static DEFINE_PER_CPU(unsigned long, nfsd_file_pages_flushed);
|
|
||||||
static DEFINE_PER_CPU(unsigned long, nfsd_file_evictions);
|
static DEFINE_PER_CPU(unsigned long, nfsd_file_evictions);
|
||||||
|
|
||||||
struct nfsd_fcache_disposal {
|
struct nfsd_fcache_disposal {
|
||||||
|
@ -395,7 +394,6 @@ nfsd_file_flush(struct nfsd_file *nf)
|
||||||
|
|
||||||
if (!file || !(file->f_mode & FMODE_WRITE))
|
if (!file || !(file->f_mode & FMODE_WRITE))
|
||||||
return;
|
return;
|
||||||
this_cpu_add(nfsd_file_pages_flushed, file->f_mapping->nrpages);
|
|
||||||
if (vfs_fsync(file, 1) != 0)
|
if (vfs_fsync(file, 1) != 0)
|
||||||
nfsd_reset_write_verifier(net_generic(nf->nf_net, nfsd_net_id));
|
nfsd_reset_write_verifier(net_generic(nf->nf_net, nfsd_net_id));
|
||||||
}
|
}
|
||||||
|
@ -1022,7 +1020,6 @@ nfsd_file_cache_shutdown(void)
|
||||||
per_cpu(nfsd_file_acquisitions, i) = 0;
|
per_cpu(nfsd_file_acquisitions, i) = 0;
|
||||||
per_cpu(nfsd_file_releases, i) = 0;
|
per_cpu(nfsd_file_releases, i) = 0;
|
||||||
per_cpu(nfsd_file_total_age, i) = 0;
|
per_cpu(nfsd_file_total_age, i) = 0;
|
||||||
per_cpu(nfsd_file_pages_flushed, i) = 0;
|
|
||||||
per_cpu(nfsd_file_evictions, i) = 0;
|
per_cpu(nfsd_file_evictions, i) = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1237,7 +1234,7 @@ nfsd_file_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
|
||||||
*/
|
*/
|
||||||
int nfsd_file_cache_stats_show(struct seq_file *m, void *v)
|
int nfsd_file_cache_stats_show(struct seq_file *m, void *v)
|
||||||
{
|
{
|
||||||
unsigned long releases = 0, pages_flushed = 0, evictions = 0;
|
unsigned long releases = 0, evictions = 0;
|
||||||
unsigned long hits = 0, acquisitions = 0;
|
unsigned long hits = 0, acquisitions = 0;
|
||||||
unsigned int i, count = 0, buckets = 0;
|
unsigned int i, count = 0, buckets = 0;
|
||||||
unsigned long lru = 0, total_age = 0;
|
unsigned long lru = 0, total_age = 0;
|
||||||
|
@ -1265,7 +1262,6 @@ int nfsd_file_cache_stats_show(struct seq_file *m, void *v)
|
||||||
releases += per_cpu(nfsd_file_releases, i);
|
releases += per_cpu(nfsd_file_releases, i);
|
||||||
total_age += per_cpu(nfsd_file_total_age, i);
|
total_age += per_cpu(nfsd_file_total_age, i);
|
||||||
evictions += per_cpu(nfsd_file_evictions, i);
|
evictions += per_cpu(nfsd_file_evictions, i);
|
||||||
pages_flushed += per_cpu(nfsd_file_pages_flushed, i);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
seq_printf(m, "total entries: %u\n", count);
|
seq_printf(m, "total entries: %u\n", count);
|
||||||
|
@ -1279,6 +1275,5 @@ int nfsd_file_cache_stats_show(struct seq_file *m, void *v)
|
||||||
seq_printf(m, "mean age (ms): %ld\n", total_age / releases);
|
seq_printf(m, "mean age (ms): %ld\n", total_age / releases);
|
||||||
else
|
else
|
||||||
seq_printf(m, "mean age (ms): -\n");
|
seq_printf(m, "mean age (ms): -\n");
|
||||||
seq_printf(m, "pages flushed: %lu\n", pages_flushed);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue