Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752567AbdG1POp (ORCPT ); Fri, 28 Jul 2017 11:14:45 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:40071 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751792AbdG1POl (ORCPT ); Fri, 28 Jul 2017 11:14:41 -0400 X-IronPort-AV: E=Sophos;i="5.40,425,1496073600"; d="scan'208";a="37677124" From: Bart Van Assche To: "mpe@ellerman.id.au" , "bjking1@us.ibm.com" , "axboe@kernel.dk" CC: "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" Subject: Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage Thread-Topic: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage Thread-Index: AQHTBpbYyx2cmVtqXUGNBRJ+OE1bb6JntOSAgAAMdACAAButgIAA6MUAgACH2ACAAA1cgA== Date: Fri, 28 Jul 2017 15:13:44 +0000 Message-ID: <1501254817.2413.1.camel@wdc.com> References: <87a83qfosu.fsf@concordia.ellerman.id.au> <073ed79c-11ce-e86c-a905-91fd28675d47@kernel.dk> <1501166846.2516.1.camel@wdc.com> <5b85a365-faa1-3987-9b6b-270399c30686@kernel.dk> <87lgn9dqx3.fsf@concordia.ellerman.id.au> <92379297-9667-ae52-b05c-6c8a0ce4751c@kernel.dk> In-Reply-To: <92379297-9667-ae52-b05c-6c8a0ce4751c@kernel.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bart.VanAssche@wdc.com; x-originating-ip: [63.163.107.100] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1534;20:A9/6jsw/ehBt3bI0DBH/DPush0KHkVI2sKIRRmKg1Vzl/Qgs7bHuySrDc6QMM83J9cj0lRifHhcTfivq+8Km4ZofPBZP8ixL9Ly1VEAM3don9zLwnKtkGD51k6nqBmZwPv7OxuZ4CH6TDlBAr4lq6iVjCZoHMWDZbBvHxcta1AY= x-ms-office365-filtering-correlation-id: 8b5e02ab-6223-48d5-a77a-08d4d5cb3d50 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR0401MB1534; x-ms-traffictypediagnostic: CY1PR0401MB1534: wdcipoutbound: EOP-TRUE x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0401MB1534;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0401MB1534; x-forefront-prvs: 03827AF76E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39850400002)(39860400002)(39840400002)(39400400002)(39410400002)(39450400003)(377454003)(24454002)(377424004)(189002)(199003)(189998001)(97736004)(101416001)(2906002)(8936002)(8656003)(2501003)(68736007)(86362001)(102836003)(6116002)(5660300001)(93886004)(2950100002)(53546010)(3846002)(66066001)(33646002)(25786009)(305945005)(8676002)(4326008)(6512007)(38730400002)(99286003)(14454004)(36756003)(7736002)(230783001)(54906002)(6246003)(106356001)(6436002)(50986999)(76176999)(54356999)(103116003)(6506006)(3280700002)(478600001)(3660700001)(2201001)(81156014)(81166006)(105586002)(53936002)(2900100001)(229853002)(72206003)(77096006)(6486002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1534;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2017 15:13:44.8762 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1534 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v6SFEnQW017521 Content-Length: 1572 Lines: 38 On Fri, 2017-07-28 at 08:25 -0600, Jens Axboe wrote: > On 07/28/2017 12:19 AM, Michael Ellerman wrote: > > OK, so the resolution is "fix it in IPR" ? > > I'll leave that to the SCSI crew. But at least one bug is in IPR, if you > look at the call trace: > > - timer function triggers, runs ipr_reset_timer_done(), which grabs the > host lock AND disables interrupts. > - further down in the call path, ipr_ioa_bringdown_done() uncondtionally > enables interrupts: > > spin_unlock_irq(ioa_cfg->host->host_lock); > scsi_unblock_requests(ioa_cfg->host); > spin_lock_irq(ioa_cfg->host->host_lock); > > And the call to scsi_unblock_requests() is the one that ultimately runs > the queue. The IRQ issue aside here, scsi_unblock_requests() could run > the queue async, and we could retain the normal sync run otherwise. > > Can you try the below fix? Should be more palatable than the previous > one. Brian, maybe you can take a look at the IRQ issue mentioned above? > > [ ... ] Hello Jens, Are there other block drivers that can call blk_mq_start_hw_queues() from interrupt context? I'm currently working on converting the skd driver (drivers/block/skd_main.c) from a single queue block driver into a scsi-mq driver. The skd driver calls blk_start_queue() from interrupt context. As we know it is not safe to call blk_mq_start_hw_queues() from interrupt context. Can you recommend me how I should proceed: should I implement a solution in the skd driver or should perhaps the blk-mq core be modified? Thanks, Bart.