Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nfsd: remove the pages_flushed statistic from filecache

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>

authored by

Jeff Layton and committed by
Chuck Lever
1f696e23 296f3d7f

+1 -6
+1 -6
fs/nfsd/filecache.c
··· 58 58 static DEFINE_PER_CPU(unsigned long, nfsd_file_acquisitions); 59 59 static DEFINE_PER_CPU(unsigned long, nfsd_file_releases); 60 60 static DEFINE_PER_CPU(unsigned long, nfsd_file_total_age); 61 - static DEFINE_PER_CPU(unsigned long, nfsd_file_pages_flushed); 62 61 static DEFINE_PER_CPU(unsigned long, nfsd_file_evictions); 63 62 64 63 struct nfsd_fcache_disposal { ··· 395 396 396 397 if (!file || !(file->f_mode & FMODE_WRITE)) 397 398 return; 398 - this_cpu_add(nfsd_file_pages_flushed, file->f_mapping->nrpages); 399 399 if (vfs_fsync(file, 1) != 0) 400 400 nfsd_reset_write_verifier(net_generic(nf->nf_net, nfsd_net_id)); 401 401 } ··· 1021 1023 per_cpu(nfsd_file_acquisitions, i) = 0; 1022 1024 per_cpu(nfsd_file_releases, i) = 0; 1023 1025 per_cpu(nfsd_file_total_age, i) = 0; 1024 - per_cpu(nfsd_file_pages_flushed, i) = 0; 1025 1026 per_cpu(nfsd_file_evictions, i) = 0; 1026 1027 } 1027 1028 } ··· 1235 1238 */ 1236 1239 int nfsd_file_cache_stats_show(struct seq_file *m, void *v) 1237 1240 { 1238 - unsigned long releases = 0, pages_flushed = 0, evictions = 0; 1241 + unsigned long releases = 0, evictions = 0; 1239 1242 unsigned long hits = 0, acquisitions = 0; 1240 1243 unsigned int i, count = 0, buckets = 0; 1241 1244 unsigned long lru = 0, total_age = 0; ··· 1263 1266 releases += per_cpu(nfsd_file_releases, i); 1264 1267 total_age += per_cpu(nfsd_file_total_age, i); 1265 1268 evictions += per_cpu(nfsd_file_evictions, i); 1266 - pages_flushed += per_cpu(nfsd_file_pages_flushed, i); 1267 1269 } 1268 1270 1269 1271 seq_printf(m, "total entries: %u\n", count); ··· 1276 1280 seq_printf(m, "mean age (ms): %ld\n", total_age / releases); 1277 1281 else 1278 1282 seq_printf(m, "mean age (ms): -\n"); 1279 - seq_printf(m, "pages flushed: %lu\n", pages_flushed); 1280 1283 return 0; 1281 1284 }