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=1796209347; b=Mi9hXMgDIAMXZ35TQUgDYq+ASj2N9zDLaCKVmIQZUE9kVHThS7/8K4py769LZqXLT0JQ VuluSCccUJqiLNRzW6CUuQqso8MkOv1xT3LbCcv6A2ybX1Q8D8qU0b7nU5BdRi4/dfbRv V01BZMxFcheT9rLTvVWUtpME6RrrjgXgnA8/tJzg6cl0doE+ySdz+wz1UuMoHGCerrPmg EAt/YccUhDJU/nJShmRFdAr6Jv5SEHOF9C0wHnP7e/H/siYdZMyvaGHLsqrmVT7+p7WJO 7ITaYim5RvRVwiTyLtwsKc/cKgIzV1hcpZfxGmoq9Cl3TLf5NQKXsUBktCG2/D6Sdow== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796209347; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=LIxFRAEd8EI6REboQyFjBNVYLwXHWv4gDWViFhMMOh8=; b=hvZCVKUI64ezv4t47itfWOzLOf5higkUN74EUiHNY+BTs1AR7A4N8/noMBxPBGbpew+5 r0Vs8g8pCbnrcRccIL6M+YUpMWyTrbyHc7bxiyIrXwGggcobieFNtti7G3rS2wCaj/qbZ C/bAV4LjzqK0HQnFm+ydd/x1DvS7zT28+PlcW6xrk5JVTfzPPNxvDjMvUgqXyirqzRLa4 xrUVG4xnqTuIsbWcddXzc5JscpUQvwMaPo9NKzNnwSf0n0WVXjC4FmZtMD6d9cKEdQpEm B0MlRzZa5+1P4U4X24jVxr25wxM0tKY9fd++j0hFNis59iFhLpZ4hs5aom2ZD6R9fuQ== 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=PKk9wnvX; 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 AD0C4606A31A for ; Wed, 2 Dec 2026 11:02:27 +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=PKk9wnvX Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3024B1F00924; Wed, 2 Dec 2026 11:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796209347; bh=LIxFRAEd8EI6REboQyFjBNVYLwXHWv4gDWViFhMMOh8=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=PKk9wnvXyr1RRiSA8r9QVB2+SuTsfaMxQTE14YXSskOQj60noY4oPZm+CynNh24f3 VW0/Vb7sJIHWNwk2MmmC+RzXDJfCcadkxkFHFvM08ifrrgyxyTviZvYcf68/nPfXep IAoebpyV1dAf3s57oMQKspnl1thB4QGxlunzG68jeePGIuIJZst+uTM3Hsl1BHQs8K VOUahd8X5xzeEEm4iwkColhFyP6ecPvmwWAufwAVpuexuJZgJjAYm5EX8vawULYjh8 2C1LRGrNQOV2ey+kTHaIU6wM/8OVX3P6zy3m4qSzG9OajyVBKm3B74F66MkgP481Ju JdoIFJbNuOXhA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] 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: <20261202104637.1339868-2-manish.pandey@oss.qualcomm.com> References: <20261202104637.1339868-1-manish.pandey@oss.qualcomm.com> <20261202104637.1339868-2-manish.pandey@oss.qualcomm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 11:02:26 +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 1 potential issue to consider: - [Medium] scsi: ufs: core: PM QoS vote unapplied when clocks turn on before init -- commit 682ec1c599258d663f87f8a96559aec268c4cbaa Author: Manish Pandey scsi: ufs: core: Apply PM QoS vote whenever the UFS clocks are on This commit moves the CPU latency PM QoS vote management out of ufshcd_scale_clks() and applies it unconditionally in ufshcd_setup_clocks() so the vote tracks the UFS clock on/off state. > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index 7d0e60e073029..51620320c7a53 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -1204,8 +1204,6 @@ int ufshcd_scale_clks(struct ufs_hba *hba, unsigned= long freq, bool scale_up) > goto out; > } > =20 > - ufshcd_pm_qos_update(hba, scale_up); > - > out: > trace_ufshcd_profile_clk_scaling(hba, > (scale_up ? "up" : "down"), > @@ -9964,8 +9962,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); > out: > if (ret) { > list_for_each_entry(clki, head, list) { [Severity: Medium] Does this leave hba->pm_qos_req at PM_QOS_DEFAULT_VALUE when the clocks are turned on before ufshcd_pm_qos_init() runs? During ufshcd_init(), ufshcd_hba_init() enables the clocks via ufshcd_setup_clocks(hba, true) before ufshcd_pm_qos_init() is called at the end of ufshcd_init(). At that point hba->pm_qos_enabled is still false, so ufshcd_pm_qos_update(hba, true) returns early without voting. When ufshcd_pm_qos_init() then registers the request (or when PM QoS is re-enabled at runtime via pm_qos_enable_store() while clocks are already on), it initializes the request to PM_QOS_DEFAULT_VALUE: drivers/ufs/core/ufshcd.c:ufshcd_pm_qos_init() { if (hba->pm_qos_enabled) return; cpu_latency_qos_add_request(&hba->pm_qos_req, PM_QOS_DEFAULT_VALUE); if (cpu_latency_qos_request_active(&hba->pm_qos_req)) hba->pm_qos_enabled =3D true; } With ufshcd_pm_qos_update() removed from ufshcd_scale_clks(), nothing applies the vote after ufshcd_pm_qos_init() until the clocks are gated off and ungated again, or until a suspend/resume cycle if clock gating is disabled. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202104637.1339= 868-1-manish.pandey@oss.qualcomm.com?part=3D1