linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/9] Generic per-sb io stats
@ 2022-03-05 16:04 Amir Goldstein
  2022-03-05 16:04 ` [PATCH v4 1/9] lib/percpu_counter: add helpers for "relaxed" counters Amir Goldstein
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Amir Goldstein @ 2022-03-05 16:04 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Dave Chinner, Al Viro, linux-unionfs, linux-fsdevel

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/20220301184221.371853-1-amir73il@gmail.com/

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

-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-03-10 10:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-05 16:04 [PATCH v4 0/9] Generic per-sb io stats Amir Goldstein
2022-03-05 16:04 ` [PATCH v4 1/9] lib/percpu_counter: add helpers for "relaxed" counters Amir Goldstein
2022-03-05 16:04 ` [PATCH v4 2/9] lib/percpu_counter: add helpers for arrays of counters Amir Goldstein
2022-03-08 10:03   ` Amir Goldstein
2022-03-05 16:04 ` [PATCH v4 3/9] fs: tidy up fs_flags definitions Amir Goldstein
2022-03-05 16:04 ` [PATCH v4 4/9] fs: add optional iostats counters to struct super_block Amir Goldstein
2022-03-05 16:04 ` [PATCH v4 5/9] fs: collect per-sb io stats Amir Goldstein
2022-03-05 16:04 ` [PATCH v4 6/9] fs: report " Amir Goldstein
2022-03-10  9:53   ` Miklos Szeredi
2022-03-10 10:45     ` Amir Goldstein
2022-03-05 16:04 ` [PATCH v4 7/9] ovl: opt-in for " Amir Goldstein
2022-03-05 16:04 ` [PATCH v4 8/9] fuse: " Amir Goldstein
2022-03-05 16:04 ` [PATCH v4 9/9] fs: enable per-sb io stats for all blockdev filesystems Amir Goldstein
2022-03-06  4:18 ` [PATCH v4 0/9] Generic per-sb io stats Theodore Ts'o
2022-03-06  7:55   ` Amir Goldstein
2022-03-07  0:14   ` Dave Chinner
2022-03-07 10:04     ` Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).