From nobody Tue Nov 26 19:52:19 2024 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFEE4433CB; Wed, 16 Oct 2024 02:47:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=222.66.158.135 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729046839; cv=none; b=QEjs54xaiLoTEVurp4O//KMG1G6/FcbS+X7gdMZJ3Qo5B0wkNGxMRJDZN4PChMjtq4C6oRyTiY4tVVJS7KwZB6/O3ce1XqG0krX9Rvmlby+duhQYUp2jpO9YMPJMcmdChp7kp3rDbHC5LIsslhKhFejjnCkZzBGdxZa1pt0bstI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729046839; c=relaxed/simple; bh=5vhbPHK3Lf0vVi0FNmnj/Mq/QQhJ12Fqy9P86uNPUiI=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=mXJS9yOpvaPZjWad+xqem4bMQevJhR2fplq+TaUxW8sURfPp8f8T1q0U2PnzTr4G0fP//X9fdMQx6ckXTjf60s+nMAWG6M6hyWHRRzRT6aZfM+SIsXIhkQdhqiEWYd0ir44hlnDUr5ui3ojQQ2JsNYSeJrCDXVIPDZBPRwmDeMk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com; spf=pass smtp.mailfrom=unisoc.com; arc=none smtp.client-ip=222.66.158.135 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unisoc.com Received: from SHSQR01.spreadtrum.com (localhost [127.0.0.2] (may be forged)) by SHSQR01.spreadtrum.com with ESMTP id 49G2lCuv090236; Wed, 16 Oct 2024 10:47:12 +0800 (+08) (envelope-from Xiuhong.Wang@unisoc.com) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 49G2jGh1081782; Wed, 16 Oct 2024 10:45:16 +0800 (+08) (envelope-from Xiuhong.Wang@unisoc.com) Received: from SHDLP.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4XSwLB5Yyhz2PVftg; Wed, 16 Oct 2024 10:45:06 +0800 (CST) Received: from tj10379pcu.spreadtrum.com (10.5.32.15) by BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 16 Oct 2024 10:45:13 +0800 From: Xiuhong Wang To: , , , , , CC: , , Subject: [PATCH V2] Revert "blk-throttle: Fix IO hang for a corner case" Date: Wed, 16 Oct 2024 10:45:08 +0800 Message-ID: <20241016024508.3340330-1-xiuhong.wang@unisoc.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX02.spreadtrum.com (10.0.64.8) X-MAIL: SHSQR01.spreadtrum.com 49G2jGh1081782 Content-Type: text/plain; charset="utf-8" This reverts commit 5b7048b89745c3c5fb4b3080fb7bced61dba2a2b. The main purpose of this patch is cleanup. The throtl_adjusted_limit function was removed after commit bf20ab538c81 ("blk-throttle: remove CONFIG_BLK_DEV_THROTTLING_LOW"), so the problem of not being able to scale after setting bps or iops to 1 will not occur. So revert this commit that bps/iops can be set to 1. Cc: Baolin Wang Cc: Yu Kuai Signed-off-by: Xiuhong Wang Signed-off-by: Zhiguo Niu Acked-by: Tejun Heo Reviewed-by: Yu Kuai --- V1 -> V2: Updated description to clarify this is mostly a cleanup --- block/blk-throttle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 2c4192e12efa..443d1f47c2ce 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -1485,13 +1485,13 @@ static ssize_t tg_set_limit(struct kernfs_open_file= *of, goto out_finish; =20 ret =3D -EINVAL; - if (!strcmp(tok, "rbps") && val > 1) + if (!strcmp(tok, "rbps")) v[0] =3D val; - else if (!strcmp(tok, "wbps") && val > 1) + else if (!strcmp(tok, "wbps")) v[1] =3D val; - else if (!strcmp(tok, "riops") && val > 1) + else if (!strcmp(tok, "riops")) v[2] =3D min_t(u64, val, UINT_MAX); - else if (!strcmp(tok, "wiops") && val > 1) + else if (!strcmp(tok, "wiops")) v[3] =3D min_t(u64, val, UINT_MAX); else goto out_finish; --=20 2.25.1