Received: by 10.223.176.5 with SMTP id f5csp1572091wra; Wed, 7 Feb 2018 23:17:58 -0800 (PST) X-Google-Smtp-Source: AH8x227zDThvNUJ7gASuM68uxWEwO228qZ38+1+G8KyxzDQFSUbRDLjdPDndrHNYjB+mNubs1jMX X-Received: by 2002:a17:902:9306:: with SMTP id bc6-v6mr8563694plb.29.1518074278042; Wed, 07 Feb 2018 23:17:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518074277; cv=none; d=google.com; s=arc-20160816; b=fw/rL2VsjH56GIMl3w6bPT2AKW20Qy3hx6ryYh9CdmQK8/9toGD7MfDZcS2v0YV50O /8we+U3wcn8H3Gj/MrCUxPV8cxTSri9tmP7Bu+mcfMEzi9L4TFBhFshD3MHNFNyzGVbZ qFeTy2pG5I3ACBUPva4ntiRWc7OUXou8BIkkEmL6XllbB4XSfbgqOw4l0pVxytbd1rT7 xokF7wVfiHelA4WTu96ffn6L4KZ77M9qc4VubnDsGdwU9v5qF0Pf0bfdhvf7+3zyzV3s CxAemXOL2yifAApB/3y5TDRFL12f2nyRjMd9DFQpXoR5RlistxZk+DHtBRbyWvnvWEfD Y6ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=JOXKBSB3C3aKxz0lCf7bFE3/cxJvsnpo9+adt9BMDTk=; b=t4AagtUe+I+9zXxD8kon1arMBJVbuLqDqSb0J0EA0bwTUAitoIOtHN13GOhUCkWhV7 DRYCsqrUm4aRPM6a3pFiAZFxCnGcm8LOMUcVIpIBkG6KITn5iDHExAx4Nq1RY/SUZz6o Fh/n+HBBV4TnewdRwVe5qz21QWCan5243ZT28yvjnmC2ul5h+VunDucplE5V7+B7ynC9 eAxc36wWVytZIyhyZGpZHji4THWDrDrMVpDdnuJmd3CxjcQyZuUpjgdckgNEPckC+u7E SerNjN08RbqoluQ/Ck4Lnl55GMKfh0PB5flsfsM2V/HV0gIfGJbH63lz7qDVFSwdA1Gk HIsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wy6gHVdU; 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 j7si970262pgp.293.2018.02.07.23.17.43; Wed, 07 Feb 2018 23:17:57 -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=Wy6gHVdU; 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 S1750929AbeBHHRB (ORCPT + 99 others); Thu, 8 Feb 2018 02:17:01 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:36232 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbeBHHQ6 (ORCPT ); Thu, 8 Feb 2018 02:16:58 -0500 Received: by mail-wm0-f52.google.com with SMTP id f3so7844245wmc.1 for ; Wed, 07 Feb 2018 23:16:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JOXKBSB3C3aKxz0lCf7bFE3/cxJvsnpo9+adt9BMDTk=; b=Wy6gHVdUhzmQAARahwrPXYopL89eeCgcmNaeX/9UrwV9EsVyW3LL8UBPVzIs3xU9s6 fIOdGT6yvVmkVt6clCzUjuJeXxPU3tnKHfsWUlqjcCrX/xwBRmJ3X+lGWvP6w2gWGq6Z e2unXVeUWk6BURTspjGsw7wP12GAbIVlw45AQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JOXKBSB3C3aKxz0lCf7bFE3/cxJvsnpo9+adt9BMDTk=; b=VunvNNynXVqEXTIklBmj4eysVfGzwNhgPMgwIJ4fiQmMG3Sqb9vq4AQ8Si2bycL5N6 vZaw7dSHYjhlEeoPIBFUTLMTIBcWRjxF7h5/5O9Ai0bfVkl00QbI9l6nKUsTpeDe5+eF AF6Y5pPevorIhCWWbDXR3x1C0g94JnGanyAKKaiGWWGqGm9aoQ+Jnqmq4dyqeXZTPYeX XNaFTvnHO00ERcLuJjSHOWVnRzqDsANJEr2zQANu9Mh9dZG1vwBHRBrUxkuBZAW5To0H 5UvURo8FEJQK0vkuK6sqT+lpQfWIiGCwNtcYx2h4DzQPwOFTLzGBGHnU2PEzybBl0sqh jTNA== X-Gm-Message-State: APf1xPCq23DN80LLMMRlvVjDhd/axhrMmbxdxrSaYCHI+zA+++F/5hsd 52jBTg3TJBePJasKHwMV4DtUOw== X-Received: by 10.80.189.200 with SMTP id z8mr215667edh.46.1518074217641; Wed, 07 Feb 2018 23:16:57 -0800 (PST) Received: from [192.168.0.102] (146-241-1-195.dyn.eolo.it. [146.241.1.195]) by smtp.gmail.com with ESMTPSA id c45sm2291966edb.17.2018.02.07.23.16.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 23:16:56 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: [PATCH BUGFIX V3] block, bfq: add requeue-request hook From: Paolo Valente In-Reply-To: <17c57205-7cc0-5577-0322-dc35914e50e5@kernel.dk> Date: Thu, 8 Feb 2018 08:16:51 +0100 Cc: linux-block , Linux Kernel Mailing List , Ulf Hansson , Mark Brown , Linus Walleij , 'Paolo Valente' via bfq-iosched , Oleksandr Natalenko , Alban Browaeys , Ming Lei , Ivan Kozik , 169364@studenti.unimore.it, holger@applied-asynchrony.com, efault@gmx.de, Serena Ziviani Content-Transfer-Encoding: quoted-printable Message-Id: <34041F0A-F460-4736-9A6C-76D861EA0070@linaro.org> References: <20180207211920.6343-1-paolo.valente@linaro.org> <17c57205-7cc0-5577-0322-dc35914e50e5@kernel.dk> To: Jens Axboe 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 > Il giorno 07 feb 2018, alle ore 23:18, Jens Axboe ha = scritto: >=20 > On 2/7/18 2:19 PM, Paolo Valente wrote: >> Commit 'a6a252e64914 ("blk-mq-sched: decide how to handle flush rq = via >> RQF_FLUSH_SEQ")' makes all non-flush re-prepared requests for a = device >> be re-inserted into the active I/O scheduler for that device. As a >> consequence, I/O schedulers may get the same request inserted again, >> even several times, without a finish_request invoked on that request >> before each re-insertion. >>=20 >> This fact is the cause of the failure reported in [1]. For an I/O >> scheduler, every re-insertion of the same re-prepared request is >> equivalent to the insertion of a new request. For schedulers like >> mq-deadline or kyber, this fact causes no harm. In contrast, it >> confuses a stateful scheduler like BFQ, which keeps state for an I/O >> request, until the finish_request hook is invoked on the request. In >> particular, BFQ may get stuck, waiting forever for the number of >> request dispatches, of the same request, to be balanced by an equal >> number of request completions (while there will be one completion for >> that request). In this state, BFQ may refuse to serve I/O requests >> from other bfq_queues. The hang reported in [1] then follows. >>=20 >> However, the above re-prepared requests undergo a requeue, thus the >> requeue_request hook of the active elevator is invoked for these >> requests, if set. This commit then addresses the above issue by >> properly implementing the hook requeue_request in BFQ. >=20 > Thanks, applied. >=20 I Jens, I forgot to add Tested-by: Oleksandr Natalenko in the patch. Is it still possible to add it? Thanks, Paolo > --=20 > Jens Axboe