From patchwork Thu Jan 10 03:12:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauricio Faria de Oliveira X-Patchwork-Id: 1022683 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43ZrgL28jcz9sNJ; Thu, 10 Jan 2019 14:13:50 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ghQmu-00077n-Nl; Thu, 10 Jan 2019 03:13:44 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1ghQmc-0006vA-8B for kernel-team@lists.ubuntu.com; Thu, 10 Jan 2019 03:13:26 +0000 Received: from mail-qt1-f200.google.com ([209.85.160.200]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ghQmb-0000YR-U5 for kernel-team@lists.ubuntu.com; Thu, 10 Jan 2019 03:13:26 +0000 Received: by mail-qt1-f200.google.com with SMTP id f2so8861987qtg.14 for ; Wed, 09 Jan 2019 19:13:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=CPcAg2JspMXPui061EvhcJkOpF6Fmur6n+bW9lC0iFk=; b=trTlVeUJrOi9Yw8h/nrtOclXxst6LYaxCwVxl12rI7kRMt1HYGRduFwr1HJxa0jlxL 2sxjQCvVySu4DjT8Sxn+y4HL+Is6gGmeSLouhi51tDQMLnBuFjQNkw2Wk/BX68aER0Y8 z7tRk5iXc3fWtL6+1BP4IMrGf1x2Piz/IDj/rz+qJv29F0sX3RFlvVo6QBPuDIbC7E9K 0829CP21bor1hixUW/bVSrArGnohA/Xohtw/eedE9dDGGQgtkYMgwfG8Urh412+3kOMb aMlJUFqUDM2Mb6xwg1nE7juGSFiZZX0Jsza+euS4sidLmqnPLv1rGHZopNOErQoo8yqH /TAA== X-Gm-Message-State: AJcUukdduy7btUjK8ajvZuP883TKnWGkFF9V7TRf2l8R+jvAiXpRRAS1 3AsdbduDWn0j17Q2dOSXzFpy9U56kTgoJ6Ug5DsMscXBuxl9uNcKM591wKgoIcV3gh4Hlo68Fsq /34u2VgrUGTIPAbXAVWkd+oRZhLtZ2xVXUQqG+zv8pA== X-Received: by 2002:ac8:6983:: with SMTP id o3mr8169497qtq.60.1547090004948; Wed, 09 Jan 2019 19:13:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN4I6+ghXOZ5lzzUi13GDmvz9L9eFnzzu/CK8yHmfpjUabb2znYSFo1MvhlwUtZGAquheDmzNw== X-Received: by 2002:ac8:6983:: with SMTP id o3mr8169493qtq.60.1547090004810; Wed, 09 Jan 2019 19:13:24 -0800 (PST) Received: from localhost.localdomain ([177.181.227.0]) by smtp.gmail.com with ESMTPSA id s9sm43971956qta.35.2019.01.09.19.13.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 19:13:24 -0800 (PST) From: Mauricio Faria de Oliveira To: kernel-team@lists.ubuntu.com Subject: [SRU B][PATCH 13/13] blk-wbt: wake up all when we scale up, not down Date: Thu, 10 Jan 2019 01:12:19 -0200 Message-Id: <20190110031219.30676-14-mfo@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190110031219.30676-1-mfo@canonical.com> References: <20190110031219.30676-1-mfo@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Josef Bacik BugLink: https://bugs.launchpad.net/bugs/1810998 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 Signed-off-by: Jens Axboe (cherry picked from commit 5e65a20341e02df637d1c16cd487858d2c6a876a) Signed-off-by: Mauricio Faria de Oliveira --- 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 0a68645aae6b..9e9d733bae77 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c @@ -305,6 +305,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"); } @@ -313,7 +314,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"); }