Skip to content

Generic per-sb io stats

Amir Goldstein linux-fsdevel linux-unionfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 7 repliesIn review
  2. v36 patches 15 repliesSuperseded
  3. v26 patches 8 repliesSuperseded

Changes in v4 from the cover letter

- Use "relaxed" counters to reduce performance overhead
- Opt-in to per-sb io stats via fs_flags (dchinner)
- Add patch to auto-enable io stats for all blockdev fs (dchinner)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9lib/percpu_counter: add helpers for "relaxed" countersinclude/linux/percpu_counter.h+29 -00 replies
2/9lib/percpu_counter: add helpers for arrays of countersfs/nfsd/export.c fs/nfsd/nfscache.c fs/nfsd/stats.c +3 more+59 -421 reply
3/9fs: tidy up fs_flags definitionsinclude/linux/fs.h+7 -70 replies
4/9fs: add optional iostats counters to struct super_blockfs/Kconfig fs/super.c include/linux/fs.h +1 more+153 -20 replies
5/9fs: collect per-sb io statsfs/read_write.c+64 -240 replies
6/9fs: report per-sb io statsfs/proc_namespace.c+16 -02 replies
7/9ovl: opt-in for per-sb io statsfs/overlayfs/super.c+2 -10 replies
8/9fuse: opt-in for per-sb io statsfs/fuse/inode.c+2 -10 replies
9/9fs: enable per-sb io stats for all blockdev filesystemsfs/super.c+6 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/9] Generic per-sb io stats

Miklos,

I ran some micro benchmarks on v3 patch [1] which demonstrated up to 20% slowdown for some workloads (many small reads/writes in a small VM). This revision adds the "relaxed" percpu counter helpers to mitigate the iostats counters overhead.

With the relaxed counters, the micro benchmarks that I ran did not demonstrate any measurable overhead on xfs, on overlayfs over xfs and overlayfs over tmpfs.

Dave Chinner asked why the io stats should not be enabled for all filesystems. That change seems too bold for me so instead, I included an extra patch to auto-enable per-sb io stats for blockdev filesystems.

Should you decide to take the patches for enabling io stats for overlayfs and/or fuse through your tree, it is up to you to whether you want to take this patch as well or leave it out until more people have a chance to test it and run more performance tests on their setups.

Thanks,
Amir.

[1] https://lore.kernel.org/linux-fsdevel/[email protected]/

Changes since v3:
- Use "relaxed" counters to reduce performance overhead
- Opt-in to per-sb io stats via fs_flags (dchinner)
- Add patch to auto-enable io stats for all blockdev fs (dchinner)

Changes since v2:
- Change from per-mount to per-sb io stats (szeredi)
- Avoid percpu loop when reading mountstats (dchinner)

Changes since v1:
- Opt-in for per-mount io stats for overlayfs and fuse

Amir Goldstein (9):
lib/percpu_counter: add helpers for "relaxed" counters lib/percpu_counter: add helpers for arrays of counters
fs: tidy up fs_flags definitions
fs: add optional iostats counters to struct super_block
fs: collect per-sb io stats
fs: report per-sb io stats
ovl: opt-in for per-sb io stats
fuse: opt-in for per-sb io stats
fs: enable per-sb io stats for all blockdev filesystems

 fs/Kconfig                     |   8 ++
 fs/fuse/inode.c                |   3 +-
 fs/nfsd/export.c               |  10 ++-
 fs/nfsd/nfscache.c             |   5 +-
 fs/nfsd/stats.c                |  37 +---------
 fs/nfsd/stats.h                |   3 -
 fs/overlayfs/super.c           |   3 +-
 fs/proc_namespace.c            |  16 ++++
 fs/read_write.c                |  88 ++++++++++++++++------
 fs/super.c                     |  11 +++
 include/linux/fs.h             |  25 ++++---
 include/linux/fs_iostats.h     | 130 +++++++++++++++++++++++++++++++++
 include/linux/percpu_counter.h |  48 ++++++++++++
 lib/percpu_counter.c           |  27 +++++++
 14 files changed, 337 insertions(+), 77 deletions(-)
 create mode 100644 include/linux/fs_iostats.h
Signature · 1 line
2.25.1