Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1767680ybg; Thu, 30 Jul 2020 02:04:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyN8SyK0/yzfKxhkT6HNIKh0Q34R+ymphwHit71wjTp6aZpNjsxORqVsarBg+KID2V6VkG X-Received: by 2002:a05:6402:17ab:: with SMTP id j11mr1697425edy.28.1596099870060; Thu, 30 Jul 2020 02:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596099870; cv=none; d=google.com; s=arc-20160816; b=0ki7zgnGdayWNOXKhEHWox2ha8YsKSxD2vL0ZBxkoVJ02YHj/GeLXQ4MrRa8hZm/oa Ok304AWyxuQ6rpSNXLrPoEZUdKmBXOoeddDjc4y8VJdjE8Bt5kVU/z2FRHLTW8STDCuz lowTb3iE6uVb/r1ZnJ+yNhVEisA0PRZqdu+LF1cKahXuMEtpqWP5k6RFQ9UKFk1o7QxZ yjr+tqpaeW+SLMRyQ3vOsb3Sj1tJW24Z0czuABwR23sF2y0M7GI8o7tUxrfiIZaQhCZ1 VseDCBpdmDk1IoCSp1uzRmdBQ6W8b4K1UaCZHtmetl3kWTtnVDw3DQPlp7ZrVuMPJqp5 40hw== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=QaFCt3p70PhPdpfYX4VplxwSDGJOv+7O6cVdHFqJo+8=; b=ez1D3RUDxpZs0fRRa1k/GWagainjVdd8H52UxmsyKSDiQ/qjRs6YQYHFiTykbzo6eU TH3u+aq+QJsijD4aIA0PmMW5BQGFWZqV5CNxx79cKJRTN+r5B16fmkAPNWYj9rVqDpZR xAWQPMhvcJsrOiwJ2RADqxcEOfa0enq7y4hauEEsc8Z1EFdHkVcZEwe8hCDeId5WBWgy eo319ONLaIiGTtllX5q4B/YlDOfzY0peVGiHJR2j77qQHT+mah38jyqy1DsZFDG3VYEk 4zGjTkK0OYr6IxqHCB79X8nuuVSqNMyLEY94yDn17gz8Pd8sQb1a9GrzVsMAGwbfK3w1 4ksA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=gO3m2cAB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt2si2659542ejb.597.2020.07.30.02.04.07; Thu, 30 Jul 2020 02:04:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=gO3m2cAB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728959AbgG3JDh (ORCPT + 99 others); Thu, 30 Jul 2020 05:03:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728864AbgG3JDd (ORCPT ); Thu, 30 Jul 2020 05:03:33 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D205BC0619D2 for ; Thu, 30 Jul 2020 02:03:33 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id u10so3971504plr.7 for ; Thu, 30 Jul 2020 02:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QaFCt3p70PhPdpfYX4VplxwSDGJOv+7O6cVdHFqJo+8=; b=gO3m2cABUKQ0JZFSXpIPxZZMapd15KMvmgHC+Z9d/KpK1KfPTw8SF/N8TYQIgfOPRH I8T1RLTezCgNI8h5pAqaHcDCPnzM2S2k4GdHYDabcm82ZK9UvHYtfS3WD5wK20kpyQxy xurQQ0N/RnZgPdODXJRshuRxeT9dDsW81XxM772UhSTAgAHchnSzqVkkP9BO/IfDk8mL sNvABzgewox5KDCrR/IEjETXHP+Y1tZ8k/ouGj/W6Lle8R8Ih+LTaVeaM/YHj+w/mKR2 50FqsrGJclCoHecx1ZQ/TLYTh7JgfPkkTsh0RW7In8Nje65jCjyZlrQ7XkBGxrYJeSYl qY9g== 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:mime-version :content-transfer-encoding; bh=QaFCt3p70PhPdpfYX4VplxwSDGJOv+7O6cVdHFqJo+8=; b=tTl6G1DF2YNIUxKMkWg9gtkykVmf4SVyeQUscZ8LjQi2kGwvIBUQtAuRxf62c2aX8H /05uTIzXbcoAVEgIqZL1C/4VMt8fEZ0g+G6RUD6qAYPECgXVyozZF8zS1mb6ZOezP0oX 6pz/Qd0O5gvCU1M5oGkKbyZnR3X9rytrWdUYur9O/OvfutlHvwGHL3yAm+5klmeVF79B jeCoVDAv88862hMJG4ZU5y7mVT8lNWRVpXZppftL4hIVguIj5z4MXlhiJms6GxBCMkDn /JrbD+EvrNNce5kUPDe4/Jdn7xRWHQomfo5f+TS+1dLM/KufOX2f55DoBzqr4RKvJMah i+ew== X-Gm-Message-State: AOAM532Mc6bFh9dlzgrZ97Xyfg/fzSHCrltoKLnrLvWb7499H23QMCAk ENZQsGr13268Gl1dvXmJ2Zm0/Q== X-Received: by 2002:a17:90a:1fca:: with SMTP id z10mr140054pjz.209.1596099813408; Thu, 30 Jul 2020 02:03:33 -0700 (PDT) Received: from C02CV1DAMD6P.bytedance.net ([103.136.220.73]) by smtp.gmail.com with ESMTPSA id b185sm5217080pfg.71.2020.07.30.02.03.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2020 02:03:33 -0700 (PDT) From: Chengming Zhou To: tj@kernel.org, axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: zhouchengming@bytedance.com Subject: [PATCH] iocost: Fix check condition of iocg abs_vdebt Date: Thu, 30 Jul 2020 17:03:21 +0800 Message-Id: <20200730090321.38781-1-zhouchengming@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 8ac4aad66ebc..86ba6fd254e1 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.20.1