From patchwork Mon Jul 17 07:53:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9844157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9BE996037F for ; Mon, 17 Jul 2017 07:53:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83AE925746 for ; Mon, 17 Jul 2017 07:53:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7864626E76; Mon, 17 Jul 2017 07:53:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D594E25746 for ; Mon, 17 Jul 2017 07:53:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751274AbdGQHxo (ORCPT ); Mon, 17 Jul 2017 03:53:44 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:39777 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751268AbdGQHxn (ORCPT ); Mon, 17 Jul 2017 03:53:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cj7TjYKr93Qnj85WWEabLv13KTR91eIZ8nDWfvPPKdA=; b=JqMQeA6gUyju0iLWHypYqaXGU IJx0IivYeNOeuct4y98rFhIuwVLZ8x1YBiuNEc4zXXNvbnt6Ij3NUTCHHZKC+fDnSRykK0V7T7Ys9 bYkOfd0Pbx0no82knZfSaXcMTE/24Hjz8ygeq+gimlhawFPRm+r4QJdAbPMphk0rz+Sm/NZYrV4r9 rRacciLiHC82tPdO/jc1HF6B3yXU/RFBeBcsKwLJrrysDj3/OBjTasrKf0gCluOlTeQyBDePYTPXm lA29m8anjTdySemQcoENmVKbTmWOASsuwgl7PWZqHEmBDkN7wVpj3HJcQBQ8+g8kWfbi/bDv1CUVO pC/LB/fJg==; Received: from hch by bombadil.infradead.org with local (Exim 4.87 #1 (Red Hat Linux)) id 1dX0qb-0008RR-7Y; Mon, 17 Jul 2017 07:53:41 +0000 Date: Mon, 17 Jul 2017 00:53:41 -0700 From: Christoph Hellwig To: Tomi Sarvela Cc: Christoph Hellwig , Jens Axboe , linux-block@vger.kernel.org Subject: Re: linux-next scsi-mq hang in suspend-resume Message-ID: <20170717075341.GA19733@infradead.org> References: <21128504.iYAzanzLsA@fractal.fi.intel.com> <20170713071220.GA19972@infradead.org> <20170714124424.GA28150@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I still haven't gotten hold of an i915 machine where I could run the actua ltest suite. But I did some audit of the code, and it seems blk-mq is lacking support for the RQF_PM flag. While I can't directly see how this would cause the hang your caused it's a least easy to test. Can you apply the patch below and test with the use_blk_mq=0 parameter? Note that implementing RQF_PM for blk-mq shouldn't be too hard either, but if we don't get rid of the nr_pending counter somehow it would be a severe performance penalty for all scsi devices. diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index bea36adeee17..5c3818ebee9c 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -554,7 +554,7 @@ static struct scsi_driver sd_template = { .probe = sd_probe, .remove = sd_remove, .shutdown = sd_shutdown, - .pm = &sd_pm_ops, +// .pm = &sd_pm_ops, }, .rescan = sd_rescan, .init_command = sd_init_command, @@ -3249,7 +3249,7 @@ static void sd_probe_async(void *data, async_cookie_t cookie) gd->events |= DISK_EVENT_MEDIA_CHANGE; } - blk_pm_runtime_init(sdp->request_queue, dev); +// blk_pm_runtime_init(sdp->request_queue, dev); device_add_disk(dev, gd); if (sdkp->capacity) sd_dif_config_host(sdkp);