RFC multipath-tools: Fix remaining shutdown delay issues
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest6 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | multipathd: fix daemon not really shutdownmultipathd/ | +1 | 1 reply | |
| 2/6 | multipathd: protect all access to running_statemultipathd/ | +48 | 1 reply | |
| 3/6 | multipathd: allow shutdown during configure()libmultipath/ libmultipath/ libmultipath/ +3 more | +43 | 1 reply | |
| 4/6 | multipathd: cancel threads early during shutdownmultipathd/ | +9 | 5 replies | |
| 5/6 | multipathd: add code to handle blocked signalsmultipathd/ multipathd/ | +26 | 2 replies | |
| 6/6 | multipathd: uxlsnr: handle signals while busymultipathd/ multipathd/ multipathd/ | +40 | 2 replies |
Reviews trailers per patch
2 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Benjamin Marzinski | Chongyun Wu |
|---|---|---|
| Series | T-b | |
| 1/6 | R-b | |
| 2/6 | R-b | |
| 3/6 | ||
| 4/6 | ||
| 5/6 | ||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH 0/6] multipath-tools: Fix remaining shutdown delay issues
Hi Chongyun, Ben, all,
this patch set addresses the points where I can see that handling of shutdown signals may be delayed, as discussed previously. Quoting my previous post:
Let's summarize how multipathd exit works today:
1. signal arrives
(signal may be blocked while uxlsnr is busy, see above)
2. signal is unblocked in uxlsnr thread (in ppoll())
3. signal handler sets exit_sig()
4. uxlsnr calls handle_signals()
5. handle_signals()->exit_daemon() sets DAEMON_SHUTDOWN() and postsconfig_cond (child may busy in reconfigure())
6. child detects DAEMON_SHUTDOWN and quits main loop
7. child locks vecs->lock (may cause wait)
8. sets dm_queue_if_no_path, cancels threads, and exits.
I can imagine delays in step 1, 5, and 7, but not in ppoll().
This series addresses 1) in patch 5 and 6, 5) in patch 3, and 7) in patch 4. The series also contains the part of Chongyun's previously posted patch which I agree with.
The set is compile tested, but no more so far. Chongyun, I'd be grateful if you could review it, and give it a try in your test setup.
Chongyun Wu (1):
multipathd: fix daemon not really shutdown
Martin Wilck (5):
multipathd: protect all access to running_state
multipathd: allow shutdown during configure()
multipathd: cancel threads early during shutdown
multipathd: add code to handle blocked signals
multipathd: uxlsnr: handle signals while busy
libmultipath/configure.c | 5 ++ libmultipath/discovery.c | 4 ++ libmultipath/exit.h | 5 ++ mpathpersist/main.c | 5 ++ multipath/main.c | 6 ++ multipathd/cli.c | 50 ++++++++++---- multipathd/cli.h | 2 +- multipathd/main.c | 143 ++++++++++++++++++++++++++++----------- multipathd/main.h | 1 + 9 files changed, 166 insertions(+), 55 deletions(-) create mode 100644 libmultipath/exit.h
Signature · 1 line
2.19.2