From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F403C433E0 for ; Sat, 8 Aug 2020 23:49:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4422F20723 for ; Sat, 8 Aug 2020 23:49:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596930559; bh=VhMqv89aKVSu2wYlMStOJnpTIrVpsgyXhjWZ+wheO74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=URxVT5v0v7aZuatQPpE+LfQuP8Z5a0s85GqPFamYAl/TM5l8rXziCf0G0GOjvt6uz fgyNm0rzUcGtWCNE9ZJOBir+8CML/e3/DqtBknbnvAte79cdxkGrrgrQI12Wp+wYRB LU3EmXojpvx3Gike8fE0/pBRpUmtPO8KXJ3BGsgY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727819AbgHHXhF (ORCPT ); Sat, 8 Aug 2020 19:37:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:49864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727789AbgHHXhB (ORCPT ); Sat, 8 Aug 2020 19:37:01 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C7E5820716; Sat, 8 Aug 2020 23:36:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596929820; bh=VhMqv89aKVSu2wYlMStOJnpTIrVpsgyXhjWZ+wheO74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ky6WeChsqEawuDw1mmG92iHgu7i+/iUlxiIfDTPZwmqeXf5eDO1y9+ODREArt7TZG wQgChest0TzUrymihfGhtIpt36aufCca3zBU2ID8sg+RKRi1PvSMPGZb3kiEUK1RjK wI8MOBzujLMStFKpoShcV2s5ruNDew2uXh3Gv5RU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chengming Zhou , Tejun Heo , Jens Axboe , Sasha Levin , linux-block@vger.kernel.org Subject: [PATCH AUTOSEL 5.8 54/72] iocost: Fix check condition of iocg abs_vdebt Date: Sat, 8 Aug 2020 19:35:23 -0400 Message-Id: <20200808233542.3617339-54-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200808233542.3617339-1-sashal@kernel.org> References: <20200808233542.3617339-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chengming Zhou [ Upstream commit d9012a59db54442d5b2fcfdfcded35cf566397d3 ] We shouldn't skip iocg when its abs_vdebt is not zero. Fixes: 0b80f9866e6b ("iocost: protect iocg->abs_vdebt with iocg->waitq.lock") Signed-off-by: Chengming Zhou Acked-by: Tejun Heo Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- block/blk-iocost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 8ac4aad66ebc3..86ba6fd254e1d 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -1370,7 +1370,7 @@ static void ioc_timer_fn(struct timer_list *timer) * should have woken up in the last period and expire idle iocgs. */ list_for_each_entry_safe(iocg, tiocg, &ioc->active_iocgs, active_list) { - if (!waitqueue_active(&iocg->waitq) && iocg->abs_vdebt && + if (!waitqueue_active(&iocg->waitq) && !iocg->abs_vdebt && !iocg_is_idle(iocg)) continue; -- 2.25.1