Received: by 10.213.65.68 with SMTP id h4csp767543imn; Tue, 27 Mar 2018 08:24:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELvAwXETPubB1r5MpPNDsd51xoSFVuro/naJvXKbOdnB+sLGXZITRfLVhu/y+E7SjVtql3rR X-Received: by 10.98.174.23 with SMTP id q23mr33818829pff.103.1522164274704; Tue, 27 Mar 2018 08:24:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522164274; cv=none; d=google.com; s=arc-20160816; b=dqBNEPXjQ9fVOQ316zBmppfO2DgB15J04NZfZaboa+tnLM9BapR61n4posKiik0oNB RGFiQ6TPhfNjtxgs+yqmjjTwmRc60uI/Jb598RXnOuHauyyEDMDpHrngyB43e1w3liqv 72IylWBWT6ET3BtbTz8kQjVWgLECIkwrdVO34USMWI/1Wd7Jmw9WA4ZIlvYGmWmEOYDH C4EXgqnxRNU2sIou7vR6g1zo1/FugO5ItlC9T4D/jO+/2PVLQx+frNZTRKzrDAJH1rQM QTXNm/C/72js1R5VKGu28cCl1AoCaKlEqH2jT7WPiABaphd+nDzSVXF6fFv3W2+epdk/ tGiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:openpgp :from:references:cc:to:subject:arc-authentication-results; bh=s7BeEKQfeRLYxjE0ocqNw5JYARRmWg6Emny2KlPlPAo=; b=0oY1HTaN2lbCdnMzpy1IBKQiZ8w+lyPej6eG7IaI8a1JoNwG6y2Ugf8g6+E85CNrms cqH7BH9haGjkbmcYkGGj21sxJE+U5vY6/5kTmd9Ls9h/zTJW3wH7mTEVMjkFSy8lxhsV GGY4c/RLWjH+STM+es0Pm320SbV/uUBEuUySTySbfqi9MybBRMlQiQP7yeczTRf45PFv D6Y1CdH4nxk1R27qPuvm7pyHzzR2HMl83W7RV+/RXZdSlfFl1JXfDXpVcu5S9ZMOEEc3 GsORygteJaIoateYk//GJGNdAeX2VtpwVlUdH3kEk3GWKtrE02MfLSo5aDNexsU1tdwZ hEXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1-v6si1446842pld.87.2018.03.27.08.24.20; Tue, 27 Mar 2018 08:24:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752183AbeC0PWl (ORCPT + 99 others); Tue, 27 Mar 2018 11:22:41 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40246 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752001AbeC0PWj (ORCPT ); Tue, 27 Mar 2018 11:22:39 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2RFLMjX044325 for ; Tue, 27 Mar 2018 11:22:39 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gyq6vwjt3-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Tue, 27 Mar 2018 11:22:39 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Mar 2018 16:22:36 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 27 Mar 2018 16:22:33 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2RFMWSq52363462; Tue, 27 Mar 2018 15:22:32 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 70B19A4053; Tue, 27 Mar 2018 16:15:09 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1DC2AA4051; Tue, 27 Mar 2018 16:15:09 +0100 (BST) Received: from oc7330422307.ibm.com (unknown [9.145.6.48]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 27 Mar 2018 16:15:09 +0100 (BST) Subject: Re: 4.16-RC7 WARNING: CPU: 2 PID: 0 at block/blk-mq.c:1400 __blk_mq_delay_run_hw_queue To: Ming Lei , Stefan Haberland Cc: Jens Axboe , "linux-block@vger.kernel.org" , Christoph Hellwig , Heiko Carstens , "linux-kernel@vger.kernel.org" , Martin Schwidefsky References: <96392d4b-f890-7b34-8f1e-8d51855327cc@linux.vnet.ibm.com> <20180327120143.GA20265@ming.t460p> From: Christian Borntraeger Openpgp: preference=signencrypt Date: Tue, 27 Mar 2018 17:22:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180327120143.GA20265@ming.t460p> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18032715-0040-0000-0000-00000427819C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18032715-0041-0000-0000-0000262A9B09 Message-Id: <4f039923-19cb-4268-c897-145d5d9f46d2@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-27_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803270154 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/27/2018 02:01 PM, Ming Lei wrote: > Hi Stefan, > > On Tue, Mar 27, 2018 at 12:04:20PM +0200, Stefan Haberland wrote: >> Hi, >> >> I get the following warning in __blk_mq_delay_run_hw_queue when the >> scheduler is set to mq-deadline for DASD devices on s390. >> >> What I see is that for whatever reason there is a hctx nr 0 which has no >> hctx->tags pointer set. >> From my observation it is always hctx nr 0 which has a tags NULL pointer in >> it and I see other hctx which have the hctx->tags pointer set correctly. >> >> >> [    2.169986] WARNING: CPU: 0 PID: 0 at block/blk-mq.c:1402 >> __blk_mq_delay_run_hw_queue+0xe8/0x118 >> [    2.170007] Modules linked in: >> [    2.170014] CPU: 0 PID: 0 Comm: swapper/0 Not tainted >> 4.16.0-rc7-04107-g91a05d9e1d6b-dirty #147 >> [    2.170019] Hardware name: IBM 2964 N96 702 (z/VM 6.4.0) >> [    2.170024] Krnl PSW : 0000000076fd6c7f 00000000c244c24d >> (__blk_mq_delay_run_hw_queue+0xe8/0x118) >> [    2.170035]            R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 >> RI:0 EA:3 >> [    2.170041] Krnl GPRS: 00000000599ec58a 0000000002a94000 0000000002a94000 >> 0000000000000001 >> [    2.170047]            0000000000000000 000000006e761e98 0000000002a96980 >> 0000000002a96800 >> [    2.170052]            0000000002d87ce0 00000000737fbda8 0000000000000000 >> 0000000000000001 >> [    2.170058]            0000000000000001 0000000000aedd10 00000000737fbc38 >> 00000000737fbc00 >> [    2.170069] Krnl Code: 00000000006ea3c8: ebaff0a00004 lmg     >> %r10,%r15,160(%r15) >>                           00000000006ea3ce: c0f4ffff5e0d brcl    15,6d5fe8 >>                          #00000000006ea3d4: a7f40001 brc     15,6ea3d6 >>                          >00000000006ea3d8: e340f0c00004        lg      >> %r4,192(%r15) >>                           00000000006ea3de: ebaff0a00004 lmg     >> %r10,%r15,160(%r15) >>                           00000000006ea3e4: 07f4 bcr     15,%r4 >>                           00000000006ea3e6: 41b01100 la      %r11,256(%r1) >>                           00000000006ea3ea: 182a lr      %r2,%r10 >> [    2.170158] Call Trace: >> [    2.170205] ([<0000000002a96800>] 0x2a96800) >> [    2.170248]  [<00000000006ea4c0>] blk_mq_run_hw_queue+0xa0/0x100 >> [    2.170262]  [<00000000006ea59c>] blk_mq_run_hw_queues+0x7c/0x98 >> [    2.170295]  [<00000000006e88f6>] __blk_mq_complete_request+0x10e/0x1e0 >> [    2.170300]  [<00000000006e9e30>] blk_mq_complete_request+0x80/0xa0 >> [    2.170307]  [<000000000087fad0>] dasd_block_tasklet+0x218/0x480 >> [    2.170415]  [<000000000017c3f8>] tasklet_hi_action+0xa0/0x138 >> [    2.170434]  [<0000000000a91c10>] __do_softirq+0xc8/0x540 >> [    2.170471]  [<000000000017bd4e>] irq_exit+0x136/0x140 >> [    2.170478]  [<000000000010c912>] do_IRQ+0x8a/0xb8 >> [    2.170518]  [<0000000000a90ee0>] io_int_handler+0x138/0x2e0 >> [    2.170524]  [<0000000000102cd0>] enabled_wait+0x58/0x128 >> [    2.170562] ([<0000000000102cb8>] enabled_wait+0x40/0x128) >> [    2.170577]  [<000000000010319a>] arch_cpu_idle+0x32/0x48 >> [    2.170604]  [<0000000000a8f636>] default_idle_call+0x3e/0x58 >> [    2.170613]  [<00000000001cd5d2>] do_idle+0xda/0x190 >> [    2.170621]  [<00000000001cd93e>] cpu_startup_entry+0x3e/0x48 >> [    2.170633]  [<0000000000e5ebf4>] start_kernel+0x47c/0x490 >> [    2.170641]  [<0000000000100020>] _stext+0x20/0x80 >> [    2.170650] 2 locks held by swapper/0/0: >> [    2.170658]  #0:  (&(&dq->lock)->rlock){..-.}, at: [<00000000b45eaf9e>] >> dasd_block_tasklet+0x1cc/0x480 >> [    2.170676]  #1:  (rcu_read_lock){....}, at: [<00000000bc7fa045>] >> hctx_lock+0x34/0x110 >> [    2.170750] Last Breaking-Event-Address: >> [    2.170758]  [<00000000006ea3d4>] __blk_mq_delay_run_hw_queue+0xe4/0x118 >> [    2.170803] ---[ end trace 1073cf0de1fd32d0 ]--- > > This warning is harmless, please try the following patch: > > -- > From 7b2b5139bfef80f44d1b1424e09ab35b715fbfdb Mon Sep 17 00:00:00 2001 > From: Ming Lei > Date: Tue, 27 Mar 2018 19:54:23 +0800 > Subject: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues() > > From commit 20e4d813931961fe ("blk-mq: simplify queue mapping & schedule > with each possisble CPU") on, it should be easier to see unmapped hctx > in some CPU topo, such as, hctx may not be mapped to any CPU. > > This patch avoids the warning in __blk_mq_delay_run_hw_queue() by > checking if the hctx is mapped in blk_mq_run_hw_queues(). > > Reported-by: Stefan Haberland > Cc: Christoph Hellwig > Fixes: 20e4d813931961fe ("blk-mq: simplify queue mapping & schedule with each possisble CPU") > Signed-off-by: Ming Lei Can we get this into 4.16? > --- > block/blk-mq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 16e83e6df404..48f25a63833b 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -1459,7 +1459,7 @@ void blk_mq_run_hw_queues(struct request_queue *q, bool async) > int i; > > queue_for_each_hw_ctx(q, hctx, i) { > - if (blk_mq_hctx_stopped(hctx)) > + if (blk_mq_hctx_stopped(hctx) || !blk_mq_hw_queue_mapped(hctx)) > continue; > > blk_mq_run_hw_queue(hctx, async); >