All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC for multipath queue_if_no_path timeout.
@ 2013-09-26 17:14 Frank Mayhar
  2013-09-26 17:24 ` Alasdair G Kergon
  2013-09-26 17:41 ` Mike Snitzer
  0 siblings, 2 replies; 49+ messages in thread
From: Frank Mayhar @ 2013-09-26 17:14 UTC (permalink / raw)
  To: dm-devel

Hey, folks.  We're using multipath as an in-kernel failover mechanism,
so that if an underlying device dies, multipath will switch to another
in its list.  Further, we use queue_if_no_path so that a daemon can get
involved and replace the list if the kernel runs out of alternatives.
In testing, however, we ran into a problem.

Obviously, if queue_if_no_path is on and multipath runs out of good
paths, the I/Os will sit there queued forever barring user intervention.
I was doing a lot of failure testing and encountered a daemon bug in
which it would abandon its recovery in the middle, leaving the list
intact and the I/Os queued, forever.  We fixed the daemon but the
problem is potentially still there if for some reason the daemon dies
and is not restarted.  This is a problem not solely (or even primarily)
for the queued I/O, but also because things like slab shrink can get
stuck behind that I/O and then other stuff becomes stuck behind _that_
(since tries to get locks held by shrink and may itself hold
semaphores), bringing the whole system to its knees in fairly short
order, to the point that it's impossible to even get in via the network
and reboot it.  I have an existence proof that this is the case. :-)

My idea to deal with this in the kernel was to introduce a timeout on
queue_if_no_path and make it settable either kernel-wide or per-table.
By default it's disabled and is only armed when multipath runs out of
valid paths and queue_if_no_path is on.  It's disabled again on table
load.  If the timeout ever fires, all that happens is that the handler
turns off queue_if_no_path; this causes all the outstanding I/O to get
EIO and unsticks things all the way up the chain.  Losing those I/Os is
far better than losing the entire system.

I've actually implemented this and it works.  I've debated about talking
with you folks about it but figured it was worth a shot.  I can post the
patch if you're interested.
-- 
Frank Mayhar
310-460-4042

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

end of thread, other threads:[~2013-11-07  1:03 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-26 17:14 RFC for multipath queue_if_no_path timeout Frank Mayhar
2013-09-26 17:24 ` Alasdair G Kergon
2013-09-26 17:31   ` Frank Mayhar
2013-09-26 17:38     ` Alasdair G Kergon
2013-09-26 17:47       ` Frank Mayhar
2013-09-26 17:52         ` Mike Snitzer
2013-09-26 20:36           ` [PATCH 1/1] dm mpath: Add timeout mechanism for queue_if_no_path Frank Mayhar
2013-09-26 23:22         ` RFC for multipath queue_if_no_path timeout Alasdair G Kergon
2013-09-26 23:49           ` Mike Snitzer
2013-09-27  6:07             ` Hannes Reinecke
2013-09-27  8:06               ` Hannes Reinecke
2013-09-27  8:37                 ` Alasdair G Kergon
2013-09-27 13:52                   ` Hannes Reinecke
2013-09-27 16:37                     ` Frank Mayhar
2013-09-27 16:32                 ` Frank Mayhar
2013-09-27 16:29             ` Frank Mayhar
2013-10-17 19:03             ` Frank Mayhar
2013-10-17 19:15               ` Mike Snitzer
2013-10-17 20:45                 ` Frank Mayhar
2013-10-17 21:13                   ` Mike Snitzer
2013-10-18 20:51                     ` Frank Mayhar
2013-10-18 21:47                       ` Alasdair G Kergon
2013-10-18 22:53                       ` [RFC PATCH v2] dm mpath: add a " Mike Snitzer
2013-10-30  1:02                         ` Mike Snitzer
2013-10-30 15:08                           ` Frank Mayhar
2013-10-30 15:43                             ` Mike Snitzer
2013-10-30 18:09                               ` Frank Mayhar
2013-10-31  9:36                                 ` Junichi Nomura
2013-10-31 14:16                                   ` Frank Mayhar
2013-10-31 14:31                                     ` Alasdair G Kergon
2013-10-31 17:17                                       ` Frank Mayhar
2013-11-01  1:23                                         ` Junichi Nomura
2013-11-01  1:58                                     ` Junichi Nomura
2013-11-01  4:17                                       ` Junichi Nomura
2013-11-05 15:18                                         ` Frank Mayhar
2013-11-05 16:02                                           ` [RFC PATCH v3] " Frank Mayhar
2013-11-05 16:53                                             ` Mike Snitzer
2013-11-06  6:54                                             ` Hannes Reinecke
2013-11-06 15:43                                               ` Frank Mayhar
2013-11-06 19:21                                                 ` Mike Snitzer
2013-11-07  1:03                                                   ` Junichi Nomura
2013-10-31 14:59                               ` [RFC PATCH v2] " Hannes Reinecke
2013-10-21 16:05               ` RFC for multipath " Benjamin Marzinski
2013-10-21 16:17                 ` Frank Mayhar
2013-10-23 13:39                   ` Benjamin Marzinski
2013-09-27 16:27           ` Frank Mayhar
2013-09-26 17:41 ` Mike Snitzer
2013-09-26 17:55   ` Frank Mayhar
2013-09-26 18:41     ` Mike Snitzer

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.