From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.132 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796354253; b=rNnoz8ACdHZVQLECnflBZeEKecJFkCna6WlJwjxqPKYlNvZV11pItEGDStDK8zWUOnUu cmPmGwku/D6qO/QiigcbWKv5H/ciw1MCG06uyxiIJK0wyq2iZ2Yv0edZaT461116+OCr0 GS8hr4k+QUeFA5MBWU/5nPZWz2eVGhsdAaRFW2JwJpyBD9BuGW1ib2mGkmSDJHDLRu4Eg mGtm92okNBKho9fVi32MKnHYVX6vcwG/HBBjbzcojb/gB7I4dNvKDdN0bq8hzk2wtvVaF LiNeONsFq5VLvCQhSZtwQFBLQz55Whqckd34D4f9eaESvyq0RFT7yUaYC6+4fAp9VXg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796354253; 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=nPydctUKV6u7i94I9VkESJEQF8mtK5iyvQYO/N7xUvw=; b=WrYLBO0sDdLlMts4ynuhtEcttT3WPzOymhgc3yqtamdYLOHXI148Lir3gc9Fq8CQycyw ETGnMFxl7i374v78ge6Gjkl/v+27hiQ+p1nfO3WjSyfNjVz8yZNMdeH9v9BTb/8Kplgn5 wtM9Um3Qmg3zR5Qo7rC4s1niqKXnikZDb+ruuRadUhZIyW0rFTwoauAKw3W1M4nM66M1a y7haN88LVtiuCkJlDNA6uCUjLbNQm32eg9x0kRVWa6HpCNEa3bVbdGYFvtTxGaaWa/iJr uzwS0tWSHxdsD2F1DGJjHxVLbqoHuW265EXllrZb6dqaDMejbhpuKSP8uoPxK9W3s9A== 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=EJnLZdVI; arc=none smtp.remote-ip=115.124.30.132 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) (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 08B3A606A322; Fri, 4 Dec 2026 03:17:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 08B3A606A322 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=EJnLZdVI DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1796354243; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=nPydctUKV6u7i94I9VkESJEQF8mtK5iyvQYO/N7xUvw=; b=EJnLZdVIjpMNCkw8f8dnA5U4L2P8cOB32oyzBLQxE03/PmoHq8QiBZB8BLE2suA/Bbz1jcPkFj3GWO1lcyQ2XZuNtSQ+/GuSLhacrbHshk8YVNwHFFB/ASN66Plcl779HH1NSLWPKOtMXEJ/OmdC4ePR62yDdZunwtQ+d65VkxU= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037009110;MF=jiangtianfeng@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0XGFuxz._1796354230; Received: from h68d07384.sqa.eu95.tbsite.net(mailfrom:jiangtianfeng@linux.alibaba.com fp:SMTPD_---0XGFuxz._1796354230 cluster:ay36) by smtp.aliyun-inc.com; Fri, 04 Dec 2026 11:17:23 +0800 From: Jiangtian Feng To: viresh.kumar@linaro.org Cc: rafael@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, zhongqiu.han@oss.qualcomm.com, christian.loehle@arm.com, ananthu.cv@oss.qualcomm.com, pierre.gondois@arm.com, zhangpengjie2@huawei.com, zhenglifeng1@huawei.com, zhanjie9@hisilicon.com, Jiangtian Feng Subject: Re: [PATCH 2/2] cpufreq: Keep global boost enabled after partial enable Date: Fri, 4 Dec 2026 11:17:09 +0800 Message-ID: <20261204031709.277138-1-jiangtianfeng@linux.alibaba.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: 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 Viresh, On Thu, 3 Dec 2026, Viresh Kumar wrote: > I would rather name this differently. > > bool restore = !state; `restore` reads better here. I think the initial/update rules need a small adjustment to preserve v6 behavior in two failure cases: > restore = false; If state=1 and the first policy_set_boost() call fails, restore is false from initialization, so the old global value is not restored. If state=0 and a successful call is followed by a failure, this assignment also skips the restore. v6 intentionally restores the old global value in both cases. I have therefore used the following form in v7: bool restore = true; /* after each successful policy_set_boost() */ if (state) restore = false; /* on failure */ if (restore) { /* restore the old global value */ } Only a successful enable cancels the restore. A failed enable with no successful policy updates, and every failed disable, restore the old global value. The error return and the successful per-policy updates are unchanged, so this is only the requested boolean cleanup with no functional change from v6. Thanks, Jiangtian