All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: dm-devel@redhat.com
Subject: Re: dm-mq and end_clone_request()
Date: Thu, 4 Aug 2016 11:10:28 -0400	[thread overview]
Message-ID: <20160804151028.GA6989@redhat.com> (raw)
In-Reply-To: <c4c7a8d4-206e-f9a0-af5a-447e993f99de@suse.de>

On Thu, Aug 04 2016 at  6:09am -0400,
Hannes Reinecke <hare@suse.de> wrote:

> On 08/04/2016 11:53 AM, Hannes Reinecke wrote:
> > On 08/03/2016 06:55 PM, Bart Van Assche wrote:
> >> On 08/02/2016 05:40 PM, Mike Snitzer wrote:
> >>> But I asked you to run the v4.7 kernel patches I
> >>> pointed to _without_ any of your debug patches.
> >>
> >> I need several patches to fix bugs that are not related to the device
> >> mapper, e.g. "sched: Avoid that __wait_on_bit_lock() hangs"
> >> (https://lkml.org/lkml/2016/8/3/289).
> >>
> > Hmm. Can you test with this patch?
> > 
> > diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> > index 7790a70..9daed03 100644
> > --- a/drivers/md/dm-mpath.c
> > +++ b/drivers/md/dm-mpath.c
> > @@ -439,8 +439,7 @@ static int must_push_back(struct multipath *m)
> >  {
> >         return (test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags) ||
> >                 ((test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags) !=
> > -                 test_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags)) &&
> > -                dm_noflush_suspending(m->ti)));
> > +                 test_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags)));
> >  }
> > 
> >  /*
> > 
> > Reasoning:
> > The original check for dm_noflush_suspending() was for bio-based
> > drivers, which needed to queue I/O within the device-mapper core.
> > So during suspend this I/O would keep a reference to the device-mapper
> > core and the table couldn't be swapped.
> > For request-based multipathing, however, the I/O is _never_ held within
> > the device-mapper core but rather pushed back to the request queue.
> > IE even for pushback the I/O will never hold a reference to the
> > device-mapper core, and the tables can be swapped irrespective of the
> > 'dm_noflush_suspend()' setting.
> > 
> > Or that's the idea, at least :-)
> > 
> > Yes Mike, I know, it's not going to work with bio-based multipathing.
> > But this is just for figuring out where the real issue is.
> > 
> And indeed.
> 
> multipathd is calling DM_SUSPEND _without_ the noflush_suspending flag.
> (On the grounds that originally it needed to flush all I/O from the
> device-mapper core).
> Which will be causing I/O errors if any I/O is executed after
> ->presuspend has been called.

The only time multipathd doesn't use noflush is on resize.  Otherwise
I'm pretty sure it _does_ use noflush all the time.

But the point is that the map method shouldn't be called while the
multipath device is suspended.

I already provided fixes for this, staged here:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/log/?h=dm-4.8

and relative to to 4.7:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/log/?h=dm-4.7-mpath-fixes

With these patches our testing on real SRP hardware testbed (fast DDN
backend) doesn't see any IO errors.

But I'll revisit must_push_back relative to dm_noflush_suspending();
specifically the new must_push_back_rq() could be made to not check
dm_noflush_suspending().

  reply	other threads:[~2016-08-04 15:10 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 22:57 dm-mq and end_clone_request() Bart Van Assche
2016-07-20 14:08 ` Mike Snitzer
2016-07-20 14:27   ` Mike Snitzer
2016-07-20 17:37     ` Bart Van Assche
2016-07-20 18:33       ` Mike Snitzer
2016-07-21 20:58         ` [dm-devel] " Bart Van Assche
2016-07-25 17:53           ` Mike Snitzer
2016-07-25 21:23             ` Mike Snitzer
2016-07-25 22:00               ` Bart Van Assche
2016-07-26  1:16                 ` Mike Snitzer
2016-07-26 22:51                   ` Bart Van Assche
2016-07-27 14:08                     ` Mike Snitzer
2016-07-27 15:52                       ` [dm-devel] " Benjamin Marzinski
2016-07-27 19:06                         ` Bart Van Assche
2016-07-27 19:54                           ` Mike Snitzer
2016-07-27 20:09                   ` Mike Snitzer
2016-07-27 23:05                     ` Bart Van Assche
2016-07-28 13:33                       ` Mike Snitzer
2016-07-28 15:23                         ` Bart Van Assche
2016-07-28 15:40                           ` Mike Snitzer
2016-07-29  6:28                             ` [dm-devel] " Hannes Reinecke
2016-07-26  6:02             ` Hannes Reinecke
2016-07-26 16:06               ` Mike Snitzer
     [not found]         ` <317679447.7168375.1469729769593.JavaMail.zimbra@redhat.com>
     [not found]           ` <6880321d-e14f-169b-d100-6e460dd9bd09@sandisk.com>
     [not found]             ` <1110327939.7305916.1469819453678.JavaMail.zimbra@redhat.com>
     [not found]               ` <a5c1a149-b1a2-b5a4-2207-bdaf32db3cbd@sandisk.com>
     [not found]                 ` <757522831.7667712.1470059860543.JavaMail.zimbra@redhat.com>
     [not found]                   ` <536022978.7668211.1470060125271.JavaMail.zimbra@redhat.com>
     [not found]                     ` <931235537.7668834.1470060339483.JavaMail.zimbra@redhat.com>
     [not found]                       ` <1264951811.7684268.1470065187014.JavaMail.zimbra@redhat.com>
     [not found]                         ` <17da3ab0-233a-2cec-f921-bfd42c953ccc@sandisk.com>
2016-08-01 17:59                           ` Mike Snitzer
2016-08-01 18:55                             ` Bart Van Assche
2016-08-01 19:15                               ` Mike Snitzer
2016-08-01 20:46                               ` Mike Snitzer
2016-08-01 22:41                                 ` Bart Van Assche
2016-08-01 22:41                                   ` Bart Van Assche
2016-08-02 17:45                                   ` Mike Snitzer
2016-08-03  0:19                                     ` Bart Van Assche
2016-08-03  0:40                                       ` Mike Snitzer
2016-08-03  1:33                                         ` Laurence Oberman
2016-08-03  2:10                                           ` Mike Snitzer
2016-08-03  2:18                                             ` Laurence Oberman
2016-08-03  2:55                                               ` Laurence Oberman
2016-08-03 15:10                                                 ` Laurence Oberman
2016-08-03 16:06                                           ` Bart Van Assche
2016-08-03 17:25                                             ` Laurence Oberman
2016-08-03 18:03                                             ` [dm-devel] " Laurence Oberman
2016-08-03 16:55                                         ` Bart Van Assche
2016-08-04  9:53                                           ` Hannes Reinecke
2016-08-04 10:09                                             ` Hannes Reinecke
2016-08-04 15:10                                               ` Mike Snitzer [this message]
2016-08-04 16:10                                           ` Mike Snitzer
2016-08-04 17:42                                             ` Bart Van Assche
2016-08-04 23:58                                               ` Mike Snitzer
2016-08-05  1:07                                                 ` Laurence Oberman
2016-08-05 11:43                                                   ` Laurence Oberman
2016-08-05 15:39                                                     ` Laurence Oberman
2016-08-05 15:43                                                       ` Bart Van Assche
2016-08-05 18:42                                                     ` [dm-devel] " Bart Van Assche
2016-08-06 14:47                                                       ` Laurence Oberman
2016-08-07 22:31                                                         ` [dm-devel] " Bart Van Assche
2016-08-08 12:45                                                           ` Laurence Oberman
2016-08-08 13:44                                                             ` Johannes Thumshirn
2016-08-08 13:44                                                               ` Johannes Thumshirn
2016-08-08 14:32                                                               ` Laurence Oberman
2016-08-08 14:54                                                               ` Bart Van Assche
2016-08-08 15:11                                                         ` Bart Van Assche
2016-08-08 15:26                                                           ` Laurence Oberman
2016-08-08 15:28                                                             ` Bart Van Assche
2016-08-08 22:39                                                             ` Bart Van Assche
2016-08-08 22:52                                                               ` Laurence Oberman
2016-08-09  0:09                                                                 ` Laurence Oberman
2016-08-09 15:51                                                                   ` Bart Van Assche
2016-08-09 17:12                                                                     ` [dm-devel] " Laurence Oberman
2016-08-09 17:16                                                                       ` Bart Van Assche
2016-08-09 17:21                                                                         ` Laurence Oberman
2016-08-10 21:38                                                                           ` Laurence Oberman
2016-08-11 16:51                                                                             ` Laurence Oberman
2016-08-05 18:40                                                 ` Bart Van Assche
2016-07-21 20:32       ` Mike Snitzer
2016-07-21 20:40         ` [dm-devel] " Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160804151028.GA6989@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.