Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3328091imu; Fri, 18 Jan 2019 08:32:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN5jMS05PPvYe+0GLFGv2BUkJpVWb925S1bXZualwXGGlXLgnB8gscQ1WJp9FQJgF9T20/yC X-Received: by 2002:a63:d047:: with SMTP id s7mr18153823pgi.311.1547829124582; Fri, 18 Jan 2019 08:32:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547829124; cv=none; d=google.com; s=arc-20160816; b=IIvAWc8vDbT+5pknNlP0yaSjxQi+bSBSNUAvX/1VvDY1+FSf5rbsP/4YQRg4huYIht nzATqKRTVKek8ZjKrpPslc6p1L4YOnHo4YzROC290igHjiKChWjGShts3PesMDXg4xg+ WmxFsXKZXZNe7/mKBLjYwDjl19AMrviIekRyVVw3E9ojAsbdI0tuoR0YfSx7uHXsvM/4 QTA6teu04BgB6Sb3xHw3DrB9cBiuWa9kJPymNDcbawtzyGGbDMNulivxxHehNbmrxEmZ LNxNTdV5Jf4fZuYksk4IX2OYHDdBPgXE7e8/MSzDJhdDR2VZmsZFN35CuZHpx3+Mo6ab Kr6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=nQrbJ0EWr1OvfqJaPKfn7vIaxcP1q4imKqHU7SMPXMM=; b=HwOCsnpaqDRNJFkyIypV9kKhRR4JgV96bvbUUSGv9QTu/1R+i+CAOUQkkhfGuktLav IRY+/Y3UsJBmv/iutnsW/OF/399dn5uW/Ol/6P5a1Jp+HKpOhzL0awm7FxkoVoVkyTRI lI0188gIYdMsJvQW3GuquvLjqANsHcnudPaOOC3RM1HopLhE7X0h2Zau8M2ZMHP+sbc2 wNP+20umb8BvGdzEPmPkYiEEtUIEOkgA9BlX0h9L/KDWv55I3wly/scD0cqpz9QnPNhy rHQDPrGya9bwnkpJ39WxZeKIzUwGnCSu/rrDP8GWqia2EgiQSb+t+wgOkYUTmupLQkEh SmKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=VcTdX6Qu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si4568247pgh.560.2019.01.18.08.31.45; Fri, 18 Jan 2019 08:32:04 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=VcTdX6Qu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728136AbfARQ3S (ORCPT + 99 others); Fri, 18 Jan 2019 11:29:18 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:39505 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727568AbfARQ3R (ORCPT ); Fri, 18 Jan 2019 11:29:17 -0500 Received: by mail-pf1-f196.google.com with SMTP id r136so6837167pfc.6 for ; Fri, 18 Jan 2019 08:29:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nQrbJ0EWr1OvfqJaPKfn7vIaxcP1q4imKqHU7SMPXMM=; b=VcTdX6QuJhKGwBA1UDj5gDRDp3EyRO6TSycxmGdTv4io5axflpP16TLoq4jUTRiFhh CCUhz9wusG4nwqAoVd7uGMbzZQQqQ6JhkvCuWfyO165rOr+MVa0MVUvTRzFawHqZnZss b2YKXbyprpGIPxYkLgZa/LcH7FDTMTTAUo3w0FOi4YiA8qneAJ81YTdL4daBa2/+GhV5 gDIuwAyreLUwqTj78y+hMPgrnnR/S+LJ9J/HJaTC/fZWD1e4Zmb+JnVtvc2jqaayMHv5 ImDZktFAjE5n1Y8kyShazJAGl+yZkcF6g8OplmH+Iwhc/EJ1fqhJybjW3UIFaKkaKZee TTBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nQrbJ0EWr1OvfqJaPKfn7vIaxcP1q4imKqHU7SMPXMM=; b=Ou6fLT1Z2Cn70abdkV13JJkkrBKsHa4H0rBN+Dd6YeNk+smtki7sXO0ra+MsnrUbx3 wJu1oUyBXSks0wtQVpBC9XkPxMnjyNPhCQbfUKtxWE//hnFE+WA3M34sueeEzG5Xaw7c VqDqB1hbI41XC2bngYgkbuvgfaaZe6w3ORwuaQOjWnUZ1O25iE9WrxMZTVi8oEjs4rnt nTfiV8vr61XL2YqZdr4soaN7CLzUH1YywX0dbLXPYetlE16CZhNAtQtK116MsBitvuVa TQa+bj62yy495SrtMutJJpm9s4DasskCA0l6nt9FCs/aukFryU1kWJTfizDVyGuacFgi igdg== X-Gm-Message-State: AJcUukddUxw4Ow4jwS+NYGp+SEpIGUx2fCc9MkgyT1Omp/uLf2wJggcR oBUs6nGskkvwyQ+GkbkJLRbGcoakVvkkaA== X-Received: by 2002:a62:e30d:: with SMTP id g13mr19834553pfh.151.1547828956436; Fri, 18 Jan 2019 08:29:16 -0800 (PST) Received: from [192.168.1.121] (66.29.188.166.static.utbb.net. [66.29.188.166]) by smtp.gmail.com with ESMTPSA id o189sm12469032pfg.117.2019.01.18.08.29.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 08:29:15 -0800 (PST) Subject: Re: [PATCH BUGFIX RFC 0/2] reverting two commits causing freezes From: Jens Axboe To: Paolo Valente Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, linus.walleij@linaro.org, broonie@kernel.org, bfq-iosched@googlegroups.com, oleksandr@natalenko.name, hurikhan77+bko@gmail.com References: <20190118115219.63576-1-paolo.valente@linaro.org> Message-ID: <960acfd8-2425-2d30-41e9-4cd10bc20bdf@kernel.dk> Date: Fri, 18 Jan 2019 09:29:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/18/19 6:35 AM, Jens Axboe wrote: > On 1/18/19 4:52 AM, Paolo Valente wrote: >> Hi Jens, >> a user reported a warning, followed by freezes, in case he increases >> nr_requests to more than 64 [1]. After reproducing the issues, I >> reverted the commit f0635b8a416e ("bfq: calculate shallow depths at >> init time"), plus the related commit bd7d4ef6a4c9 ("bfq-iosched: >> remove unused variable"). The problem went away. > > For reverts, please put the justification into the actual revert > commit. With this series, if applied as-is, we'd have two patches > in the tree that just says "revert X" without any hint as to why > that was done. > >> Maybe the assumption in commit f0635b8a416e ("bfq: calculate shallow >> depths at init time") does not hold true? > > It apparently doesn't! But let's try and figure this out instead of > blindly reverting it. OK, I think I see it. For the sched_tags > case, when we grow the requests, we allocate a new set. Hence any > old cache would be stale at that point. > > How about something like this? It still keeps the code of having > to update this out of the hot IO path, and only calls it when we > actually change the depths. > > Totally untested... Now tested, and it seems to work for me. Note that haven't tried to reproduce the issue, I just verified that the patch functionally does what it should - when depths are updated, the hook is invoked and updates the internal BFQ depth map. -- Jens Axboe