All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Alex_Gagniuc@Dellteam.com
Cc: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
	keith.busch@intel.com
Subject: Re: Interesting 'list _add double add' with nvme drives
Date: Wed, 6 Mar 2019 11:53:41 -0700	[thread overview]
Message-ID: <20190306185341.GA1337@localhost.localdomain> (raw)
In-Reply-To: <e15de0114ffc415899aadc2d0aae418b@ausx13mps317.AMER.DELL.COM>

On Wed, Mar 06, 2019 at 06:48:28PM +0000, Alex_Gagniuc@Dellteam.com wrote:
> Hi,
> 
> I'm seeing a list error when we take away, then add back a bunch of nvme 
> drives. It's not very easy to repro, and the one surviving log is pasted 
> below.

This looks like a double completion coming from the busy request
iterator. I'm suspcious it's because that iterator considers
MQ_RQ_COMPLETE requests as "started". That doesn't really make much sense,
and I can't find a single user of this interface that actually wants to
see such requests in their callbacks.

I know you said it's difficult to repro, but could you see if the
following makes it go away?

---
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 54535f4c4570..0ddcac44f912 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -659,7 +659,7 @@ EXPORT_SYMBOL(blk_mq_complete_request);
 
 int blk_mq_request_started(struct request *rq)
 {
-	return blk_mq_rq_state(rq) != MQ_RQ_IDLE;
+	return blk_mq_rq_state(rq) == MQ_RQ_IN_FLIGHT;
 }
 EXPORT_SYMBOL_GPL(blk_mq_request_started);
 
--

WARNING: multiple messages have this Message-ID (diff)
From: kbusch@kernel.org (Keith Busch)
Subject: Interesting 'list _add double add' with nvme drives
Date: Wed, 6 Mar 2019 11:53:41 -0700	[thread overview]
Message-ID: <20190306185341.GA1337@localhost.localdomain> (raw)
In-Reply-To: <e15de0114ffc415899aadc2d0aae418b@ausx13mps317.AMER.DELL.COM>

On Wed, Mar 06, 2019@06:48:28PM +0000, Alex_Gagniuc@Dellteam.com wrote:
> Hi,
> 
> I'm seeing a list error when we take away, then add back a bunch of nvme 
> drives. It's not very easy to repro, and the one surviving log is pasted 
> below.

This looks like a double completion coming from the busy request
iterator. I'm suspcious it's because that iterator considers
MQ_RQ_COMPLETE requests as "started". That doesn't really make much sense,
and I can't find a single user of this interface that actually wants to
see such requests in their callbacks.

I know you said it's difficult to repro, but could you see if the
following makes it go away?

---
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 54535f4c4570..0ddcac44f912 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -659,7 +659,7 @@ EXPORT_SYMBOL(blk_mq_complete_request);
 
 int blk_mq_request_started(struct request *rq)
 {
-	return blk_mq_rq_state(rq) != MQ_RQ_IDLE;
+	return blk_mq_rq_state(rq) == MQ_RQ_IN_FLIGHT;
 }
 EXPORT_SYMBOL_GPL(blk_mq_request_started);
 
--

  reply	other threads:[~2019-03-06 18:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 18:48 Interesting 'list _add double add' with nvme drives Alex_Gagniuc
2019-03-06 18:48 ` Alex_Gagniuc
2019-03-06 18:53 ` Keith Busch [this message]
2019-03-06 18:53   ` Keith Busch

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=20190306185341.GA1337@localhost.localdomain \
    --to=kbusch@kernel.org \
    --cc=Alex_Gagniuc@Dellteam.com \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /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.