From: Sebastian Ott <sebott@linux.ibm.com>
To: Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>
Cc: linux-block@vger.kernel.org
Subject: Re: lockdep splats with blk-mq drivers
Date: Mon, 7 May 2018 16:48:38 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.21.1805071646480.1835@schleppi> (raw)
In-Reply-To: <alpine.LFD.2.21.1804191404540.17056@schleppi>
Hi,
On Thu, 19 Apr 2018, Sebastian Ott wrote:
> Since commit 1d9bd5161ba3 ("blk-mq: replace timeout synchronization with a
> RCU and generation based scheme") I observe lockdep complaints (full
> message attached):
>
> [ 21.763369] CPU0 CPU1
> [ 21.763370] ---- ----
> [ 21.763371] lock(&rq->gstate_seq);
> [ 21.763374] local_irq_disable();
> [ 21.763375] lock(&(&dq->lock)->rlock);
> [ 21.763377] lock(&rq->gstate_seq);
> [ 21.763379] <Interrupt>
> [ 21.763380] lock(&(&dq->lock)->rlock);
> [ 21.763382]
> *** DEADLOCK ***
>
>
> This only happens in combination with DASD (s390 specific) and another
> blk-mq driver (scsi, null_blk). The distinctive behavior of DASD is that
> it calls blk_mq_start_request with irqs disabled.
>
> This is a false positive since gstate_seq on CPU0 is from a different
> request queue / block driver than gstate_seq on CPU1.
>
> Possible fixes are to use local_irq_save/restore in blk_mq_start_request.
> Or, since it's a false positive, teach lockdep that these are different
> locks - like below:
Something we can do here? I've send 2 proposals to address this. Do they
make sense?
Regards,
Sebastian
prev parent reply other threads:[~2018-05-07 14:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 12:20 lockdep splats with blk-mq drivers Sebastian Ott
2018-05-07 14:48 ` Sebastian Ott [this message]
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=alpine.LFD.2.21.1805071646480.1835@schleppi \
--to=sebott@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox