Hi Martin,

Your analysis and patch is good for me. I will pick up those patches and 
test in our test environment, I will let you know the result when I 
finish the test, thanks.

Chongyun Wu

On 2019/1/5 1:59, Martin Wilck wrote:
> 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
> 


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to