From: Ming Lei <ming.lei@redhat.com>
To: oleksandr@natalenko.name
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
linux-block@vger.kernel.org, linux-raid@vger.kernel.org,
linux-kernel@vger.kernel.org, Shaohua Li <shli@kernel.org>
Subject: Re: I/O hangs after resuming from suspend-to-ram
Date: Wed, 30 Aug 2017 16:06:29 +0800 [thread overview]
Message-ID: <20170830080628.GA2402@ming.t460p> (raw)
In-Reply-To: <692537117e26fe71b5e07cd8c86b38e4@natalenko.name>
Hi,
On Wed, Aug 30, 2017 at 08:15:02AM +0200, oleksandr@natalenko.name wrote:
> Hello.
>
> Addressing your questions below.
>
> > Can't reproduce even with putting dmcypt on raid10 after applying my
> > patch.
>
> Just a side note, that dm-crypt is not necessary here — I am able to trigger
> hang with RAID10 and LVM only.
>
> > BTW, could you share us which blk-mq scheduler you are using on sata?
>
> Okay, now it makes sense. Previously, without your patch I was able to
> reproduce the issue with "mq-deadline", "bfq" and "none". Now, I cannot
> trigger it with "none" set, but "mq-deadline" still hangs for me. Does this
> mean each scheduler should be modified separately?
No, it shouldn't.
>
> > Could you apply the following debug patch and provide the dmesg log
> > after running the commands below?
>
> Is it still relevant since I confirm issue to be fixed with "none"?
Please try the following patch and previous patch together and see
if they make a difference:
>From bc5626b4b65c7ff26567e75f42584c2c43ffe7c1 Mon Sep 17 00:00:00 2001
From: Ming Lei <ming.lei@redhat.com>
Date: Wed, 30 Aug 2017 15:53:01 +0800
Subject: [PATCH] blk-mq: add requests in the tail of hctx->dispatch
So that we can allow to insert request at the head
of hctx->dispatch.
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
block/blk-mq-sched.c | 2 +-
block/blk-mq.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index eeeea026fb47..b40dd063d61f 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -272,7 +272,7 @@ static bool blk_mq_sched_bypass_insert(struct blk_mq_hw_ctx *hctx,
* the dispatch list.
*/
spin_lock(&hctx->lock);
- list_add(&rq->queuelist, &hctx->dispatch);
+ list_add_tail(&rq->queuelist, &hctx->dispatch);
spin_unlock(&hctx->lock);
return true;
}
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 4603b115e234..fed3d0c16266 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1067,7 +1067,7 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list)
blk_mq_put_driver_tag(rq);
spin_lock(&hctx->lock);
- list_splice_init(list, &hctx->dispatch);
+ list_splice_tail_init(list, &hctx->dispatch);
spin_unlock(&hctx->lock);
/*
--
2.9.5
--
Ming
next prev parent reply other threads:[~2017-08-30 8:06 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 11:45 I/O hangs after resuming from suspend-to-ram Oleksandr Natalenko
2017-08-26 10:37 ` Oleksandr Natalenko
2017-08-26 10:48 ` Oleksandr Natalenko
2017-08-26 11:19 ` Martin Steigerwald
2017-08-26 17:17 ` Wols Lists
2017-08-26 19:33 ` Martin Steigerwald
2017-08-26 13:32 ` Oleksandr Natalenko
2017-08-27 6:02 ` Ming Lei
2017-08-27 7:43 ` Oleksandr Natalenko
2017-08-28 12:58 ` Ming Lei
2017-08-28 13:10 ` Martin Steigerwald
2017-08-28 13:32 ` Ming Lei
2017-09-20 17:25 ` Martin Steigerwald
2017-09-20 22:17 ` Ming Lei
2017-09-24 17:33 ` Martin Steigerwald
2017-09-25 2:59 ` Ming Lei
2017-09-25 14:13 ` Martin Steigerwald
2017-09-20 22:20 ` Ming Lei
2017-09-21 7:30 ` Martin Steigerwald
2017-09-21 7:33 ` Martin Steigerwald
2017-08-28 18:22 ` Oleksandr Natalenko
2017-08-29 0:24 ` Ming Lei
2017-08-29 15:52 ` Oleksandr Natalenko
2017-08-30 2:15 ` Ming Lei
2017-08-30 5:17 ` Ming Lei
2017-08-30 6:15 ` oleksandr
2017-08-30 8:06 ` Ming Lei [this message]
2017-08-30 10:58 ` oleksandr
2017-08-30 14:37 ` Ming Lei
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=20170830080628.GA2402@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=oleksandr@natalenko.name \
--cc=shli@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