From patchwork Thu Oct 11 19:29:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10637255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F175E157A for ; Thu, 11 Oct 2018 19:29:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA3F42BFEA for ; Thu, 11 Oct 2018 19:29:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEAFF2BFFC; Thu, 11 Oct 2018 19:29:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57EE62BFEA for ; Thu, 11 Oct 2018 19:29:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727042AbeJLC6L (ORCPT ); Thu, 11 Oct 2018 22:58:11 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:43445 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726723AbeJLC6K (ORCPT ); Thu, 11 Oct 2018 22:58:10 -0400 Received: by mail-qt1-f195.google.com with SMTP id q41-v6so11237447qtq.10 for ; Thu, 11 Oct 2018 12:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=MAdLVS1jAvx78jnvwQQXkgD0hSWiqkXmzWBhi+JFwzw=; b=DW4DuJGejKKxq7t0D2FKx2SAmAuPP6DvqYflvgZaoW9IPMv+ANP+73IHsbjGQpw8lS g0KQk5LwZif4fftC92l2zESfq4Usr3tuwpiMANr6cb4JQIa8+n5zBgrpQSHiWkxf9Ojv ZjKI3DngqwXm0KBn9obJJVAgFTGr0bjL8poxFPI6rcQNISSWrNr8h85mxz/P+3cgtk08 dC/TKsYrtLW5FIvXniVflCtgAxPuWLxPcTBbb3oqDJJYgZehSF/r7Nq52OjwYrq2D7rM cajGLEQtsxvHNAHKMHDRFfmTIeLCxOWdwlhk+lsesVy6VWgmZZVYFDpt/Kjg/vcxdQwk K1ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MAdLVS1jAvx78jnvwQQXkgD0hSWiqkXmzWBhi+JFwzw=; b=KXvno40apGFv3DcjQrG8E0yusuq4TkGrJveax3lPyk3mo3CrVDYEzbLBv6wFLSvFIL vCdcm1iTttza2kIYg9xdwTw4sYYmA9Yshe3a/uS3rR0ZV4wMa6WKuhE42MxLHY6bKf8z EacYPK/Cx1i0wZZoBAJtwnJdvA6bxipx4WFPwvo2GcnesHm9ER+VR2Sbcuvceg65QtgU QrgL3Y0VVdsaU41pQ33e8XZYDGTf8c3o4opUBFmOG/nu5iNf5B7KFCUNqFPwlC0qT6yb m5RDYg+gaLkDR9OsU0K3IdDRnkYvOhKDwUzjSjIh2mktSv/0dX9bgRUFF9PRAijw5Ivp S8LA== X-Gm-Message-State: ABuFfojpM3lBnTlcRxvFLwA003zBWiULJriyq1GyxK9O3XIEcYljbr4a lOlUs5ObrSzVYOd1S0Yxy5FygsAlWgw= X-Google-Smtp-Source: ACcGV61djrAEyInH1ACvf0DhCh695jt5AH5GtAL6ti1cqTsVeqOT7+j/+SgXOI3rDsQ7pivTku04fg== X-Received: by 2002:aed:2c25:: with SMTP id f34-v6mr2883066qtd.203.1539286172680; Thu, 11 Oct 2018 12:29:32 -0700 (PDT) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id t22-v6sm15447730qtt.1.2018.10.11.12.29.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Oct 2018 12:29:31 -0700 (PDT) From: Josef Bacik To: axboe@kernel.dk, linux-block@vger.kernel.org, kernel-team@fb.com Cc: stable@vger.kernel.org Subject: [PATCH] blk-wbt: wake up all when we scale up, not down Date: Thu, 11 Oct 2018 15:29:30 -0400 Message-Id: <20181011192930.2844-1-josef@toxicpanda.com> X-Mailer: git-send-email 2.14.3 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Tetsuo brought to my attention that I screwed up the scale_up/scale_down helpers when I factored out the rq-qos code. We need to wake up all the waiters when we add slots for requests to make, not when we shrink the slots. Otherwise we'll end up things waiting forever. This was a mistake and simply puts everything back the way it was. cc: stable@vger.kernel.org Fixes: a79050434b45 ("blk-rq-qos: refactor out common elements of blk-wbt") eported-by: Tetsuo Handa Signed-off-by: Josef Bacik --- JENS! I did this on for-4.20/block FYI block/blk-wbt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-wbt.c b/block/blk-wbt.c index 8e20a0677dcf..8ac93fcbaa2e 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c @@ -310,6 +310,7 @@ static void scale_up(struct rq_wb *rwb) rq_depth_scale_up(&rwb->rq_depth); calc_wb_limits(rwb); rwb->unknown_cnt = 0; + rwb_wake_all(rwb); rwb_trace_step(rwb, "scale up"); } @@ -318,7 +319,6 @@ static void scale_down(struct rq_wb *rwb, bool hard_throttle) rq_depth_scale_down(&rwb->rq_depth, hard_throttle); calc_wb_limits(rwb); rwb->unknown_cnt = 0; - rwb_wake_all(rwb); rwb_trace_step(rwb, "scale down"); }