From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.97 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796037225; b=IR3cChDDOaJFmWdfcGVkKLy5w2rq7L9ClsSBwPqcnhZ9eXivnN2cKUnJ9LE/91uyttJE XI+zUcqMgZd8G7Pa2mcFBRL4pnnTcdjK2R3j10p4o2lm3Mbr8NVg1hDn10jhfteZO3coY tuQV30RlwNhTAXFmk4TbVNQn/H0gFRo1O02dcy0Ag7+ddGxU9GBt62Dp8Cd8/ynCll1E3 7TOlWX/9ImbkiJLZc9RhqOq6qbVVNT/5mZzfO+WodLCNinrgBMgENMt+atLFHIjmz9JlW /tryQ1RgzBnlTkCXHCFtCn20NVfGl3meGoxhM3hQJdQmWc+YwnEIFumtBd/h4WZFoag== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796037225; h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=OR4dIb9slUpsOl6frtokfB3gSGl5iljvyikojmHEg9g=; b=IA1FzxXbI7gMJekoHAcBqRV4/E4dOKIcqekIvRfeTqARxdqyi6pm0P/PZvlTYTtRkb4D yzDOnsICqUhdR+NRzHu1OgfCg2VXqYC69V9MrFV4CctAqLvOJtoqAOBvD4DlD45GyyMcF NxZMOMXu0AHkAc/mxGDbbpjrbLCEj3ZgjY2IBBved6O/MPjVTu2W7N2bDigLWB3XEgxGn YXgj46LtL7w7IcsnmxdOWL61iBrBhcen5tkblzcIiJ8m/jel7oBPPDrptW11Y3RzHTNa4 9JrH2WPJIKCvNxcYwWTYs3XTOsW+YJ/S7wf/84pk9/kXZ/26dEG5ZguXXszdzy2W3iA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=k71d1Ulw; arc=none smtp.remote-ip=115.124.30.97 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E51F606A31C; Mon, 30 Nov 2026 11:13:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4E51F606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=k71d1Ulw DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1796037220; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=OR4dIb9slUpsOl6frtokfB3gSGl5iljvyikojmHEg9g=; b=k71d1UlwarFLiblpfe+uLAEdOiRCMa81ovyDOgBmkXNDSaj2I0m+efxbd3DLJnjwauEPGoQuul9yGWvMTtlNGbxOKM8wTl5Xr2U/KW/goevH4sinRCJUbVIts6hESnanrErTPT7uMD3hqSJyawhSrZgoE2Uyh1uvCfYhUINGa94= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037033178;MF=jiangtianfeng@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0XFk0ScX_1796037211; Received: from h68d07384.sqa.eu95.tbsite.net(mailfrom:jiangtianfeng@linux.alibaba.com fp:SMTPD_---0XFk0ScX_1796037211 cluster:ay36) by smtp.aliyun-inc.com; Mon, 30 Nov 2026 19:13:40 +0800 From: Jiangtian Feng To: zhangpengjie2@huawei.com Cc: ananthu.cv@oss.qualcomm.com, christian.loehle@arm.com, pierre.gondois@arm.com, rafael@kernel.org, viresh.kumar@linaro.org, zhongqiu.han@oss.qualcomm.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] cpufreq: Keep global boost enabled after partial enable Date: Mon, 30 Nov 2026 19:13:27 +0800 Message-ID: <20261130111327.363632-1-jiangtianfeng@linux.alibaba.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <744b868b-55af-4a12-86a8-f4fd5d132e6a@huawei.com> References: <744b868b-55af-4a12-86a8-f4fd5d132e6a@huawei.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Pengjie, On Mon, 30 Nov 2026, Pengjie Zhang wrote: > I agree with treating global boost as permission. When global boost > is 0, boost must be disabled for every active policy. When it is 1, > each boost-capable policy can have boost enabled or disabled > individually. Policies without boost support remain disabled. Thank you for the review. This is also the model used by the partial-enable change. > Under that model, global boost can be 1 even when no active policy > supports boost. Since 77cf053b041f, writing either 0 or 1 to the > global knob returns -EINVAL in that case. This can happen on CPPC > systems with no boost-capable policy, or when all boost-capable > policies are offline. There are two related cases that I would like to keep distinct. A boost-capable policy may merely be inactive/offline, but there may also be no policy supporting boost at all. The function currently returns -EOPNOTSUPP for the latter, and store_boost() maps any nonzero result to -EINVAL for the sysfs write. Your description therefore matches the user-visible result. > Initializing ret to 0 in cpufreq_boost_trigger_state() would let > the core record the requested global setting and return success > for either write in this case. Errors from policy_set_boost() > would go through the failure handling in your patch. I agree that a write should not fail merely because a boost-capable policy is temporarily offline. Viresh also called out this distinction in the original discussion: https://lore.kernel.org/all/wnnfdvp3r3bg5wztazoijei2uji5xypl4b4wlvlxuwxaizu6g7@2xxyrk7kdxhf/ The later discussion accepted that the no-support case should still return an error, using -EOPNOTSUPP: https://lore.kernel.org/all/vzxdjhhkukb62kifaliwld3hhfrq2auhxt23bbz5r4vzebs3c7@2gjhlykrxfdd/ 77cf053b041f introduced that error intentionally. Initializing ret to 0 unconditionally would remove this no-support behavior as well. I will prepare a separate preparatory change that records whether any policy supports boost, while still applying policy_set_boost() only to active policies. The intent is to allow the global setting when a capable policy is inactive, preserve the no-support error otherwise, and leave real policy_set_boost() failures unchanged. The policy-list locking and lifetime rules need to be covered in the review. That keeps the partial-enable patch focused and preserves the distinction from 77cf053b041f. I will include the offline and no-support cases in the validation matrix. Best regards, Jiangtian