From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796205700; b=Dv17bbJiPtu7Cyyh9jfpkHs0JrxgK3i5Ckh9GpjK5bJi1yfORGv/7hxDLmbJVYAmfa1X BoUbsV/gtnSxk4i2HaAMLAePl3NDvjk/U2vY5GERQvvHmlDsj9EtAV+BhKG/oZhm0nDNT +3CvsgVK7S9cw93SlcD8IXdGTjxYDDU4kf/34wBYo/xsnf7115xfKiTBJqO91sRlU51Id RKbIKymmh7EA8g2PcJOcNSVPrw2ihOK/C7QaSl5POpugUIIfWIdJoajUAMyD9GnmczD7B 9uRw5dLXI/q3JJ8nZaxtp8GEnvxgFGSTyJj8d/p1PWcf7X27NEoh6dct6Ap+eQxWWvA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796205700; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=y27s8GxZFcCBpbwqOyRyQGxPr6pb2gXEig0FG7TaJqs=; b=Vmp4jy2hOOORxcjfdfJ/Wq8VnEeoTx/5A+gLjlwrHaBK0BRN4Vk2fbRaTxNwW+N9gdii erj5qn3p+t9E+An3CY8u89pXNugnTxN4esmoTdG0hHGtyK6GKzSqVFeCGfpBxLyvf7TS5 /H5udpKYxKTg/AFRmh5koNYHCp+wmGRttZdwxXJ/37GUn8BKTF7o1fLysCAk1tR0wpKZG WZB/O+N1GI8ll9dHeOrC9povMBUnok5/lJydEx/tMn23wP4M0WKLjhCmtBek8I0b3uLc+ tRWxEHP2dGyxvuVq2uyAIxiEgx5aWGECtDC4yhDU2GjQ5B+jApw7V7hSQ+IgOXMCQvQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XdnuY1Z1; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2DA22606A327 for ; Wed, 2 Dec 2026 10:01:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XdnuY1Z1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CB371F00A16; Wed, 2 Dec 2026 10:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796205699; bh=y27s8GxZFcCBpbwqOyRyQGxPr6pb2gXEig0FG7TaJqs=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=XdnuY1Z1wW1eg0IGbpcYCnLOHkBj1cZ/WB9q/P6d2smufVoGnaSS215hEJDcvR1J8 l8q+ht/K9IBUt9K4YkLYHA8uEqA08HzyIO8s2qoAypJfiA8HnuWBOP1tDc4/VXxZhW cxdIw6d4JTqu7uxoSVfmtSZL58gh9ihea/SeKNFCF3f1Nt+co/oy2JAZZAf1RDnuam Bmefwu3yPehw3gM+378M6V8CU8mSWop4sh4NQHgTgId5TgQoFmsW87i+LMlVMuibd4 kHOJ0X0fjBqpYUUo0E9BFMt+n/baf5kICTYHWYxjGYmPU93SIQYnuIjDKOay6BZ8v/ d6Ov9coQDT7vQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/1] scsi: ufs: core: Apply PM QoS vote whenever the UFS clocks are on Reply-To: sashiko-reviews@lists.linux.dev To: "Manish Pandey" Cc: linux-scsi@vger.kernel.org In-Reply-To: <20261202094649.1287449-2-manish.pandey@oss.qualcomm.com> References: <20261202094649.1287449-1-manish.pandey@oss.qualcomm.com> <20261202094649.1287449-2-manish.pandey@oss.qualcomm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 10:01:39 +0000 X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] scsi: ufs: core: ufshcd_scale_clks() drops PM QoS vote while clocks are on - [Low] scsi: ufs: core: missing Fixes trailer for commit 2777e73fc154 -- commit 57c74ecf3e797dd602e3162e1e7c9e94eaccbdc9 Author: Manish Pandey > scsi: ufs: core: Apply PM QoS vote whenever the UFS clocks are on > > ufshcd_setup_clocks() applied the PM QoS vote only when clock scaling was > not supported, relying on ufshcd_scale_clks() otherwise. But that only > updates the vote while scaling up or down, so on clock-scaling capable > controllers the vote is not held across the whole time the controller is > active. > > Without the vote, the CPUs can enter deep idle while a request (e.g. a > Query request) is still outstanding, delaying the completion interrupt and > causing command timeouts. > > Drop the ufshcd_is_clkscaling_supported() check so the PM QoS vote is > applied whenever the clocks are on and released when they are gated off, > regardless of clock scaling support. > > Signed-off-by: Manish Pandey [Severity: Low] Should this include a Fixes: tag for the commit that gated the PM QoS vote on !ufshcd_is_clkscaling_supported(hba): Fixes: 2777e73fc154 ("scsi: ufs: core: Add CPU latency QoS support for UF= S driver") > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index 7d0e60e073029..881de0dac4eff 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -9964,8 +9964,8 @@ static int ufshcd_setup_clocks(struct ufs_hba *hba,= bool on) > if (ret) > return ret; > =20 > - if (!ufshcd_is_clkscaling_supported(hba)) > - ufshcd_pm_qos_update(hba, on); > + /* Hold the PM QoS vote while the controller is active to keep CPUs out= of deep idle. */ > + ufshcd_pm_qos_update(hba, on); [Severity: Medium] Does ufshcd_scale_clks() still drop hba->pm_qos_req while the clocks are on? ufshcd_scale_clks() still calls ufshcd_pm_qos_update(hba, scale_up), and ufshcd_pm_qos_update() is not reference-counted. When devfreq scales the clocks down (scale_up =3D=3D false), it sets hba->pm_qos_req back to PM_QOS_DEFAULT_VALUE while the clocks remain enabled. Requests issued while the clocks are already in CLKS_ON (or when ufshcd_hold() cancels gate_work in REQ_CLKS_OFF) do not call ufshcd_setup_clocks(hba, true) to restore the vote, and Query requests (such as the WriteBooster toggle in ufshcd_clock_scaling_unprepare() right after scaling down) do not call ufshcd_clk_scaling_start_busy() to trigger a scale-up, leaving CPUs able to enter deep idle while requests are outstanding. Should the ufshcd_pm_qos_update() call in ufshcd_scale_clks() be removed so the vote is managed solely by ufshcd_setup_clocks()? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202094649.1287= 449-1-manish.pandey@oss.qualcomm.com?part=3D1