From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751417AbdH3IGm (ORCPT ); Wed, 30 Aug 2017 04:06:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36768 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983AbdH3IGk (ORCPT ); Wed, 30 Aug 2017 04:06:40 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E5C89806B6 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ming.lei@redhat.com Date: Wed, 30 Aug 2017 16:06:29 +0800 From: Ming Lei To: oleksandr@natalenko.name Cc: Jens Axboe , Christoph Hellwig , linux-block@vger.kernel.org, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, Shaohua Li Subject: Re: I/O hangs after resuming from suspend-to-ram Message-ID: <20170830080628.GA2402@ming.t460p> References: <3926917.BCSovyVWdL@natalenko.name> <1615033.Xza1AIGLzP@natalenko.name> <20170829002425.GA28904@ming.t460p> <2329566.kid2YYBOAQ@natalenko.name> <20170830021537.GA4897@ming.t460p> <20170830051725.GA5840@ming.t460p> <692537117e26fe71b5e07cd8c86b38e4@natalenko.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <692537117e26fe71b5e07cd8c86b38e4@natalenko.name> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 30 Aug 2017 08:06:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 --- 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