All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] multipath-tools: Fix remaining shutdown delay issues
@ 2019-01-04 17:59 Martin Wilck
  2019-01-04 17:59 ` [RFC PATCH 1/6] multipathd: fix daemon not really shutdown Martin Wilck
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Martin Wilck @ 2019-01-04 17:59 UTC (permalink / raw)
  To: Chongyun Wu; +Cc: dm-devel, Martin Wilck

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 posts
config_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

-- 
2.19.2

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

end of thread, other threads:[~2020-08-21 22:48 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 17:59 [RFC PATCH 0/6] multipath-tools: Fix remaining shutdown delay issues Martin Wilck
2019-01-04 17:59 ` [RFC PATCH 1/6] multipathd: fix daemon not really shutdown Martin Wilck
2019-01-17  0:05   ` Benjamin Marzinski
2019-01-04 17:59 ` [RFC PATCH 2/6] multipathd: protect all access to running_state Martin Wilck
2019-01-17  0:06   ` Benjamin Marzinski
2019-01-04 17:59 ` [RFC PATCH 3/6] multipathd: allow shutdown during configure() Martin Wilck
2019-01-16 23:12   ` Benjamin Marzinski
2019-01-04 17:59 ` [RFC PATCH 4/6] multipathd: cancel threads early during shutdown Martin Wilck
2019-01-16 23:40   ` Benjamin Marzinski
2019-01-17  9:59     ` Martin Wilck
2020-08-20 20:39       ` Martin Wilck
2020-08-21 22:22         ` Benjamin Marzinski
2020-08-21 22:48           ` Martin Wilck
2019-01-04 17:59 ` [RFC PATCH 5/6] multipathd: add code to handle blocked signals Martin Wilck
2019-01-16 23:59   ` Benjamin Marzinski
2019-01-17 10:04     ` Martin Wilck
2019-01-04 17:59 ` [RFC PATCH 6/6] multipathd: uxlsnr: handle signals while busy Martin Wilck
2019-01-17  0:04   ` Benjamin Marzinski
2019-01-17 10:19     ` Martin Wilck
2019-01-07 10:00 ` [RFC PATCH 0/6] multipath-tools: Fix remaining shutdown delay issues Chongyun Wu
2019-01-29  1:08 ` Chongyun Wu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.