Received: by 10.223.176.5 with SMTP id f5csp534143wra; Wed, 7 Feb 2018 03:28:39 -0800 (PST) X-Google-Smtp-Source: AH8x225uz2PeqpMIdqy/KY1Snvs1RIr1SqAQDlPlBEih6LypFjjseCqo/mKjAsBbmBsBMYoFngI6 X-Received: by 10.98.86.131 with SMTP id h3mr110022pfj.208.1518002919553; Wed, 07 Feb 2018 03:28:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518002919; cv=none; d=google.com; s=arc-20160816; b=sG4zC77LLYTguVToqsw0dAVGHfy5VTrApejUSU3My01SIfOm6bZwwQk0LHm7FDds6S pruF7Za5wjhCX/Ad/ChO4AD3tKEpM/QW9tTSOYP6bmu5Ow2vEiKfz1nQM8x2dQmSic9l 7yr6DE049eCdcp/ofcdtg3Mju44r85gdIZakP+MtO4+nNSUm0/+2rbSbIAtpXRR2HLWD 9tTCiAxUYgi5SNHKDa/uOT3ACPP7h0rXvoaCm3+pbgMqveAbdwz6lBS6T++REYussr+5 GwchJYuYSdrJ8TAvJ1rVvEgBwzm+vyBa1RhAkjXJKWUZhaVLAr0kzUYyAEZ2JK/CEuZM NnwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:dkim-signature :arc-authentication-results; bh=Ey9fF9hP9FUkJ72THYX2nrXzUEMrq4eiJUXvZVFxGJw=; b=kddqnEA6htIiFq+80tcyRL71+kfEoVQox/ZVhS4E4dLuNSDRd4SPT4srKORgkmr2I9 btqvxq0KYGdmdZ9zVUirJH5/fDzAkLtbmEKeMYQanOCofqgLe/9coH3SUWGcaRzkQ63X VO8V64OsfZeMG0U/xyAkWyYhHt1btvRXhi7b/j+64sv+k6rUhfsAVB0zzjlsLbvuezua +NWEIhs7hlLngWdZG7IYztmFP5wp9VmIw+huPVFxFsxPTcmcCWCz2jrJ04okT7fpN3wt 4e56lLtFlUkFWvFrvajvIPrIjW6Ho+/b4zUvrBjXBGqtNzsK4TTb702KKjNpHLVEBoV6 vr7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jiTl26tK; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r29si995291pfj.102.2018.02.07.03.28.25; Wed, 07 Feb 2018 03:28:39 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=jiTl26tK; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753873AbeBGL1R (ORCPT + 99 others); Wed, 7 Feb 2018 06:27:17 -0500 Received: from mail-wr0-f182.google.com ([209.85.128.182]:44129 "EHLO mail-wr0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753692AbeBGL1O (ORCPT ); Wed, 7 Feb 2018 06:27:14 -0500 Received: by mail-wr0-f182.google.com with SMTP id v31so605123wrc.11 for ; Wed, 07 Feb 2018 03:27:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Ey9fF9hP9FUkJ72THYX2nrXzUEMrq4eiJUXvZVFxGJw=; b=jiTl26tKs91fPH+Y7rLqMOg3rvWLZh6sGky31tDr1Sjp2SI/CxydRT1dVL4Ya9df81 BeT0rIc4pYOYm7VwGBiVF5IRT8yfWTmTfqEIEuK3wAbmQQr/AHZHW2yBBaEXmi/6d0H8 dfoN+dnZWgLIRpbUj6K/vz79sPcTC7bxye/q8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Ey9fF9hP9FUkJ72THYX2nrXzUEMrq4eiJUXvZVFxGJw=; b=beLASOhpDkPcjIYY0Of51fnSHVXGMdjSUSVEG8cNDCwFJOwZ84hhduTlW/Tb9mTdSz EYEKpUoQZ5c9Uj+6MN/gNCrS2/2d/NhJIgSIBdiR1UJuWISfJ0CxoTw5PYgblX9YL+AQ Y/rwDV8A1OvBLPEGW+Mc74is8t7ksf2jva+154veb2seN5l1PEuZ20Rnf7VJro7+xl5c GHe9pZsrAdbe31mkS0hoH2y8wGJnZYTLvSoO4xcLOp+2KpNJ5uO5v0djRd5XHu7relKm rsa3D7shPqtYo0JFmIVkP1uF6aTr4/zhHI84wwmwDCnR08iHY/nzpxl5dfvOFWxScqVS Ziqw== X-Gm-Message-State: APf1xPDHfhDqOAEK0IOFiKw6EUaM7S3f75kub2c6X8nHSVtb8DmIE2eT mbiv5r4qEOzc5iuugi392agFHQ== X-Received: by 10.223.185.123 with SMTP id b56mr5145565wrg.13.1518002833343; Wed, 07 Feb 2018 03:27:13 -0800 (PST) Received: from [192.168.0.100] (146-241-57-178.dyn.eolo.it. [146.241.57.178]) by smtp.gmail.com with ESMTPSA id i6sm862121wrc.46.2018.02.07.03.27.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 03:27:12 -0800 (PST) From: Paolo Valente Message-Id: <8D356375-4C35-41EC-9F4D-0E321B08F9BF@linaro.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_23BA49C6-7568-4D80-875B-318B77F8E784" Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook Date: Wed, 7 Feb 2018 12:27:10 +0100 In-Reply-To: <5584030F-8F4E-4C98-84A5-79873A1BF775@linaro.org> Cc: Oleksandr Natalenko , Jens Axboe , linux-block , Linux Kernel Mailing List , Ulf Hansson , Mark Brown , Linus Walleij , 'Paolo Valente' via bfq-iosched , Alban Browaeys , Ming Lei , Ivan Kozik , SERENA ZIVIANI <169364@studenti.unimore.it>, Serena Ziviani , =?utf-8?Q?Holger_Hoffst=C3=A4tte?= To: Mike Galbraith References: <20180205190510.5499-1-paolo.valente@linaro.org> <20180205190510.5499-2-paolo.valente@linaro.org> <1517903761.9843.12.camel@gmx.de> <899B68CC-5955-4418-8BFF-DC55A743A61B@linaro.org> <1517918234.25841.31.camel@gmx.de> <77124223e6116350a5184a5199850304@natalenko.name> <1517924768.25841.32.camel@gmx.de> <8842084cc8a26b7f46ae600bda8a7bd0@natalenko.name> <82ffc96aacc3945861cbb708df346338@natalenko.name> <1517995431.25619.5.camel@gmx.de> <1517998516.6606.1.camel@gmx.de> <5584030F-8F4E-4C98-84A5-79873A1BF775@linaro.org> X-Mailer: Apple Mail (2.3445.5.20) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Apple-Mail=_23BA49C6-7568-4D80-875B-318B77F8E784 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > Il giorno 07 feb 2018, alle ore 11:27, Paolo Valente = ha scritto: >=20 >=20 >=20 >> Il giorno 07 feb 2018, alle ore 11:15, Mike Galbraith = ha scritto: >>=20 >> On Wed, 2018-02-07 at 10:45 +0100, Paolo Valente wrote: >>>=20 >>>> Il giorno 07 feb 2018, alle ore 10:23, Mike Galbraith = ha scritto: >>>>=20 >>>> On Wed, 2018-02-07 at 10:08 +0100, Paolo Valente wrote: >>>>>=20 >>>>> The first piece of information I need is whether this failure = happens >>>>> even without "BFQ hierarchical scheduling support". >>>>=20 >>>> I presume you mean BFQ_GROUP_IOSCHED, which I do not have enabled. >>>>=20 >>>=20 >>> Great (so to speak), this saves us one step. >>>=20 >>> So, here's my next request for help: please apply the attached patch >>> (compressed to preserve it from my email client) and retry. It adds >>> several anomaly checks. I hope I have not added any false-positive >>> check. >>=20 >> kernel BUG at block/bfq-iosched.c:4742! >>=20 >> 4742 BUG_ON(!(rq->rq_flags & RQF_ELVPRIV)); >=20 > Oh my, this is as crazy as, fortunately, easy to fix. The problem is > that this is easy to fix in bfq, but increases the doubts I have > expressed in my cover letter: is it ok that, in blk-mq, the functions > of an elevator may get invoked, without control, on requests that do > not belong to that elevator? >=20 > Anyway, two requests, Mike, if you haven't had enough already: >=20 > 1. Could you paste a stack trace for this OOPS, just to understand how = we > get there? >=20 > 2. Could you please turn that BUG_ON into: > if (!(rq->rq_flags & RQF_ELVPRIV)) > return; > and see what happens? >=20 Hi Oleksandr, Holger, before I prepare a V2 candidate patch, could you please test my instrumentation patch too, with the above change made. For your convenience, I have attached a compressed archive with both the instrumentation patch and a patch making the above change. Crossing my fingers, Paolo --Apple-Mail=_23BA49C6-7568-4D80-875B-318B77F8E784 Content-Disposition: attachment; filename=patches.zip Content-Type: application/zip; x-unix-mode=0644; name="patches.zip" Content-Transfer-Encoding: base64 UEsDBBQACAAIAJZiR0wAAAAAAAAAAAAAAAA6ABAAMDAwMS1ibG9jay1iZnEtaW5zdHJ1bWVudC1y ZXF1ZXVlLWFuZC1maW5pc2gtcmVxdWVzdC5wYXRjaFVYDAAV4XpaC+F6WvUBFACVVm1P20gQ/hz/ iuFLlRDb2EkMIb0i+gLXSpTyfjpVlbVer5M9HK+zttOio//9ZrxOSHOBgoVEdnben9ln91irKTA/ 4qy3u+tFCfeHop8Mk/3d/SGLol4v4P3E63OxnwgOn1UGlyIHfw88b1T/Qc/zfOsY3YzgjKlUwQ1L RVYK+COnpTs3y8NUZkwrV+nxgfWBlWIEf4nYhj04FhE68Yfge6O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IsP+9X6 /d6xQHckS/gHyoJGWgw/46Q/VJzBb7ZX661Vt4iRdVvlw6u7vD9w+zNzpu4OT6Ozl21eadUfjkdn YjsNiPjB3A8Q+gVQSwcICduEVeQBAAA+AwAAUEsBAhUDFAAIAAgAlmJHTPSd8m/dBAAAWgwAADoA DAAAAAAAAAAAQKSBAAAAADAwMDEtYmxvY2stYmZxLWluc3RydW1lbnQtcmVxdWV1ZS1hbmQtZmlu aXNoLXJlcXVlc3QucGF0Y2hVWAgAFeF6WgvhelpQSwECFQMUAAgACACWYkdMCduEVeQBAAA+AwAA NgAMAAAAAAAAAABApIFVBQAAMDAwMi1ibG9jay1iZnEtdHVybi1CVUdfT04taW50by1hLWNoZWNr LWZvci1leGl0LnBhdGNoVVgIAAvheloL4XpaUEsFBgAAAAACAAIA5AAAAK0HAAAAAA== --Apple-Mail=_23BA49C6-7568-4D80-875B-318B77F8E784 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > Thanks a lot, > Paolo --Apple-Mail=_23BA49C6-7568-4D80-875B-318B77F8E784--