From patchwork Mon Feb 22 09:51:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junichi Nomura X-Patchwork-Id: 8374441 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CA7AFC0553 for ; Mon, 22 Feb 2016 09:56:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3EFD20220 for ; Mon, 22 Feb 2016 09:56:26 +0000 (UTC) Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C494120211 for ; Mon, 22 Feb 2016 09:56:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1M9rGPi060617; Mon, 22 Feb 2016 04:53:17 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u1M9rEVi031833 for ; Mon, 22 Feb 2016 04:53:14 -0500 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1M9rEVN001607 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 Feb 2016 04:53:14 -0500 Received: from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [210.143.35.52]) by mx1.redhat.com (Postfix) with ESMTPS id DA2328E706; Mon, 22 Feb 2016 09:53:13 +0000 (UTC) Received: from mailgate3.nec.co.jp ([10.7.69.160]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id u1M9rCWS018272; Mon, 22 Feb 2016 18:53:12 +0900 (JST) Received: from mailsv.nec.co.jp (imss63.nec.co.jp [10.7.69.158]) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) with ESMTP id u1M9rBj22739; Mon, 22 Feb 2016 18:53:11 +0900 (JST) Received: from mail01b.kamome.nec.co.jp (mail01b.kamome.nec.co.jp [10.25.43.2]) by mailsv.nec.co.jp (8.13.8/8.13.4) with ESMTP id u1M9rB7r015683; Mon, 22 Feb 2016 18:53:11 +0900 (JST) Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.136] [10.38.151.136]) by mail03.kamome.nec.co.jp with ESMTP id BT-MMP-5696820; Mon, 22 Feb 2016 18:51:30 +0900 Received: from BPXM12GP.gisp.nec.co.jp ([10.38.151.204]) by BPXC08GP.gisp.nec.co.jp ([10.38.151.136]) with mapi id 14.03.0224.002; Mon, 22 Feb 2016 18:51:30 +0900 From: Junichi Nomura To: Mike Snitzer Thread-Topic: dm-multipath test scripts Thread-Index: AQHRanBKUqtLlSz/RUCjLYVPGcKDg58x7qqAgACHMgCAALmqgIAAsCmAgANhwwA= Date: Mon, 22 Feb 2016 09:51:28 +0000 Message-ID: <56CADA20.7050209@ce.jp.nec.com> References: <20151007053923.GA10749@xzibit.linux.bs1.fc.nec.co.jp> <20160218171745.GA15071@redhat.com> <56C662F1.8070407@ce.jp.nec.com> <56C6D45A.6060407@ce.jp.nec.com> <20160219194216.GB21133@redhat.com> <20160220061247.GA23333@redhat.com> In-Reply-To: <20160220061247.GA23333@redhat.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.34.125.85] Content-ID: MIME-Version: 1.0 X-RedHat-Spam-Score: -1.602 (BAYES_50, DCC_REPUT_13_19, RCVD_IN_DNSWL_MED, SPF_HELO_PASS, SPF_PASS) 210.143.35.52 TYO202.gate.nec.co.jp 210.143.35.52 TYO202.gate.nec.co.jp X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.75 on 10.5.110.25 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id u1M9rEVi031833 X-loop: dm-devel@redhat.com Cc: device-mapper development , linux-scsi Subject: Re: [dm-devel] dm-multipath test scripts X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 02/20/16 15:12, Mike Snitzer wrote: > On Fri, Feb 19 2016 at 2:42pm -0500, Mike Snitzer wrote: >> Have you been running with blk-mq? >> Either by setting CONFIG_DM_MQ_DEFAULT or: >> echo Y > /sys/module/dm_mod/parameters/use_blk_mq >> >> I'm seeing test_02_sdev_delete fail with blk-mq enabled. > > I only see failure if I stack dm-mq ontop of old non-mq scsi devices with: > > echo N > /sys/module/scsi_mod/parameters/use_blk_mq > echo Y > /sys/module/dm_mod/parameters/use_blk_mq Ah, I didn't test that combination. I can see the failure, too. > But this makes me think the novelty of having dm-mq support stacking on > non-blk-mq devices was misplaced. It is a senseless config. I'll > probably remove support for such stacking soon (next week). Looking at the failure, I suspect it could be a common issue of dm-mq regardless of underlying device type. When requeueing, following calls happen in dm-mq: dm_requeue_original_request() { .. blk_mq_requeue_request(rq); blk_mq_kick_requeue_list(rq->q); then from block workqueue: blk_mq_requeue_work() { .. blk_mq_start_hw_queue(q); and blk_mq_start_hw_queue() re-starts the queue even if DM has stopped it for suspending. As a result, dm-mq ends up repeating submit-error-requeue forever and suspend never completes. Or, suspend somehow proceeds to clear DMF_NOFLUSH_SUSPENDING and I/O error may directly be returned to submitter. Attached patch fixes the problem for DM. But given the code comment, there should be call sites which depend on 'start-if-stopped' behavior of blk_mq_requeue_work and we may need other solution. diff --git a/block/blk-mq.c b/block/blk-mq.c index 56c0a72..bbfe936 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -481,11 +481,7 @@ static void blk_mq_requeue_work(struct work_struct *work) blk_mq_insert_request(rq, false, false, false); } - /* - * Use the start variant of queue running here, so that running - * the requeue work will kick stopped queues. - */ - blk_mq_start_hw_queues(q); + blk_mq_run_hw_queues(q, false); } void blk_mq_add_to_requeue_list(struct request *rq, bool at_head)