Skip to content

speeding up mpathpersist

Martin Wilck dm-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 1 replyIn review
  2. v1 RFC7 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- avoid memory leak with --batch-file (Ben Marzinski)
- add documentation to usage() output and mpathpersist man page
- integrate "mpathpersist.8: fix examples in man page" which I'd sent separately before

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9mpathpersist: call usage() just once on returnmpathpersist/main.c+2 -90 replies
2/9mpathpersist: add option --batch-file (-f)mpathpersist/main.c mpathpersist/main.h+168 -370 replies
3/9mpathpersist: no need to treat error close() as fatalmpathpersist/main.c+2 -90 replies
4/9libmpathpersist: updatepaths: deal with missing pp->udevlibmpathpersist/mpath_persist.c+12 -00 replies
5/9libmpathpersist: factor out initialization and teardownlibmpathpersist/mpath_persist.c libmpathpersist/mpath_persist.h+142 -1290 replies
6/9mpathpersist: initialize data structures only oncempathpersist/main.c+8 -30 replies
7/9libmpathpersist: don't bother with prioritieslibmpathpersist/mpath_persist.c+0 -70 replies
8/9mpathpersist.8: fix examples in man pagempathpersist/mpathpersist.8+34 -90 replies
9/9mpathpersist.8: add documentation for --batch-file (-f)mpathpersist/mpathpersist.8+77 -10 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/9] speeding up mpathpersist

We've had reports that mpathpersist doesn't scale well in environments with lots of IO devices. This patch set tries to address this problem with a few optimizations:

- instead of doing a full path discovery at startup, only look at paths that are part of the maps being worked on
- allow multiple PR commands in a single run using "batch files", without re-discovering everything between PR commands
- avoid looking at priorities

I've done some basic testing and it seems to work. It remains to be seen what the effect on performance really is, but the amount of system calls to be performed for a given set of mpathpersist actions should be substantially reduced in any case, especially when using batching.

---
v2:
- avoid memory leak with --batch-file (Ben Marzinski)
- add documentation to usage() output and mpathpersist man page
- integrate "mpathpersist.8: fix examples in man page" which I'd sent separately before

Martin Wilck (9):
mpathpersist: call usage() just once on return
mpathpersist: add option --batch-file (-f)
mpathpersist: no need to treat error close() as fatal
libmpathpersist: updatepaths: deal with missing pp->udev
libmpathpersist: factor out initialization and teardown
mpathpersist: initialize data structures only once
libmpathpersist: don't bother with priorities mpathpersist.8: fix examples in man page mpathpersist.8: add documentation for --batch-file (-f)

 libmpathpersist/mpath_persist.c | 250 +++++++++++++++-----------------
 libmpathpersist/mpath_persist.h |  40 +++++
 mpathpersist/main.c             | 227 ++++++++++++++++++++++-------
 mpathpersist/main.h             |   1 +
 mpathpersist/mpathpersist.8     | 121 ++++++++++++++--
 5 files changed, 440 insertions(+), 199 deletions(-)
Signature · 1 line
2.21.0