From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 D91884964F for ; Sun, 21 Jun 2026 05:57:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782021451; cv=none; b=G2jnDTq/f1aGi2qxg2JV4IEO3AIJ3CWSTRPpRe3vcs3rPXpN+GsmOXilccYcDk88AyBROe52F1rzqc1EfhDORL3H7xJbTH9Njigi5Y/vWm4AG4jl9UzN4nIjQEZz9080RyZAvCSii5Yi1CzTQx3vo+oNEnyHvOHFLsjD2IHvP+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782021451; c=relaxed/simple; bh=R1NaCQ74JFKmew+ktDdDs+WyW0MOG2Ms1oqZFD5yQng=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FEUo8w8+1aoztChnTIMM0X0bQ8fr8V309G6xjnvPYEV9FKL0MxXaMue+QdFz2r7UXlWuPv6DE6OScR2kYYPKdVnFcGJ9w+zIda1viaDyaoHZ5U5B2FSIrgYYj2MVEr/8iNPlH4D8pZ+XSlwHWYWSnJDI0iqcshGOTyOWZ818Hb0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=o8eCQMxs; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=FJ2JY/g/; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="o8eCQMxs"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="FJ2JY/g/" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65KMcoxg737234 for ; Sun, 21 Jun 2026 05:57:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 964KfmrmHoTS+Q4MkaaCOJP7ON20gPV30QDDvDUeSCU=; b=o8eCQMxsoJ+7vJME a0IwXhWqpDypJ8IeUB2HDnGEDh79WNFljxBGPGGICcmeGbH/VOW6pZJE2PZdSkKh rubxDH8omV5/fhGbjkppRN/HDtAkOXQ3Ju5XtpweYDZas6APdnPr3jPibOvSsTR4 WWy4WBlPmM89n9uyrU2kyzYVAsL+9FfeJjrJyPbHajxlxH78IVBx8utDaVRMIWtl Pg5B2X+CyriwrWzuT04/pNZwgG9oYhTHqg3rGzwXlQOTlUYnOIUZJHYkW5HCDiwR rie6t+8FmqeFXdlO7LtODIiHSUaYaqKmxNsEub8N3m3XKm9mn2psa6x0TbY8fbqB xSn48Q== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ewjxuabht-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 21 Jun 2026 05:57:28 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-36d985df4cfso2947005a91.1 for ; Sat, 20 Jun 2026 22:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782021448; x=1782626248; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=964KfmrmHoTS+Q4MkaaCOJP7ON20gPV30QDDvDUeSCU=; b=FJ2JY/g/YkpOzyrq9KbI0+QGV6EyrmmatzawLmnkYMfiKcRxD8qCH9Ga+TRMG8eaUa y/Eoes2+2ubxGj2tUWOrqI9k1Ji3DPfYodVwPxAsqJWAjd6D93pd7nEHFPY0VryTRM41 dDM28f6GUZJ3Z9b6OfeAsTfp7+tX4wIAt7QjfMJcpOaVcUtekhYLd1MuX3Qbfoah1+Nm DYaLw80FoDnOsujhCZAXgxrPpljzqdPPeiDTiissh7NGFV8qV/4Ldub6YN9XeUz+tDtL fEWFr4a+/w6U7/zlCEe4ZGTg4cWSeF9OOfBa6ZcdUMPeMYGjIVJG+aMStLWAM7eeqLrZ rKCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782021448; x=1782626248; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=964KfmrmHoTS+Q4MkaaCOJP7ON20gPV30QDDvDUeSCU=; b=XxaxeVOUjvRPvt8CwPvN4nBO0tLMBPva5PoxXPKTs9KE7OFUQoUq90J/VwBJsWGkmA wMj1nNMmWuv1/LOr2HNVVyImyH6L/u6Ifn2DvQY6Eitu6BAXvR38FxuO+8xQdVPTwRJR J7Ak0Zj5snXvjPWtjbBtLcyvlw9OnOSgLp4KmGLR4T+m3UAHhY9N4ydkgIppeEn/va0Q 6mEeOxp79nF6A++GtXBXnK/++N8/GjYRyO6oxGnX7LGZlyIFVqDfoQhCQ23UEuKiFCEO tOPAW0mYWg1Lg3AVfD3pxbrHvqljxRR7Kq5Q0MnVQSpKIUH42KJmXLKB1o+CTy0a9ivF VPdg== X-Forwarded-Encrypted: i=1; AHgh+RpwWKe+XELQffM9By2DQxu4N51RogeDDuqNUQHdLaaVs9Q+k6o6hxdIt5tteA0bfHiHAi0d26QeGeXPIyU=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+NUXGGeb2icE7u8nHq8XLumcNd81vq9QhULzPIhBrZHJhYXeU SlgySR8qD4o4aBjF/n4a3pNRdlGwu3HKFVRhs0ZnFrKsgmaN7Mnn//gJPDwyjXkKpAsf1viQ/8H fRPFA86MXJtEI99g/XHctRboeYo5+4W9btTFC175xnuRfO9ITG7pg8WUiR0eU9MAsJAI= X-Gm-Gg: AfdE7cmGvUitbImyYUc9BgosslKxG9V7vmydRhK0Lxfywyod2G/TjwyBUpKpNsVnWRk 6kBcf/G1Ry6iioyrOgLa8r8aAGDuS3Q9j6jZkUgtuH2+43vVUHqGtWCnQu3W+99W/GKVnm0pdut u86WJVeHwOgFJmtJl4JccjgX/4vGKVoUYTYDJqUX35Dx5TKu0Y1h3zpG3R7eDAHDACbQuVg00+j mQj3QEdt5qt+MSFqSvOo8t8BTN+lh9f8WMwEgTcTMWhFHw/3Ee2IKi+ZNrU1Ej+/coq2s3rMLB4 keoAmONN5FdFovbpAZTVBM31LPWVdVupyUps9cX3eu5jSnGgPs8fySDPC3i9CjHj099IWmG9QEV z3yLbY22z0m9pJ6nQd/BFzDRRWamPq9KBiYy1/saDb4XA9hee9xn9MkyIbUhuCG4Og5szYoS43L TNgMxxWVM= X-Received: by 2002:a17:90a:c106:b0:366:2e1f:393 with SMTP id 98e67ed59e1d1-37d161816e3mr9522670a91.21.1782021447725; Sat, 20 Jun 2026 22:57:27 -0700 (PDT) X-Received: by 2002:a17:90a:c106:b0:366:2e1f:393 with SMTP id 98e67ed59e1d1-37d161816e3mr9522650a91.21.1782021447199; Sat, 20 Jun 2026 22:57:27 -0700 (PDT) Received: from [10.133.33.162] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-37d15df8b8esm6560444a91.16.2026.06.20.22.57.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Jun 2026 22:57:26 -0700 (PDT) Message-ID: Date: Sun, 21 Jun 2026 13:57:19 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Documentation: admin-guide: pm: cpufreq: fix sampling_rate example command To: Randy Dunlap , wangxiaodong , rafael@kernel.org, viresh.kumar@linaro.org Cc: corbet@lwn.net, skhan@linuxfoundation.org, linux-pm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, zhongqiu.han@oss.qualcomm.com References: <20260621022515.10137-1-wangxiaodong827546786@gmail.com> <10a04e7d-31b4-4c51-bf68-298f517fbab6@infradead.org> Content-Language: en-US From: Zhongqiu Han In-Reply-To: <10a04e7d-31b4-4c51-bf68-298f517fbab6@infradead.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNjIxMDA1NiBTYWx0ZWRfX2z/THgqmpmN2 WM7WlJ0/6QGm1IIfs1yO8RMawUJkSWNbe6O4yTuD893xDgelz1NKtowPe0Qm0Xe/3sguHdDGKge zpNeBhp+D6IhCygNV6xwBHQmAizR8sc= X-Authority-Analysis: v=2.4 cv=G/ws1dk5 c=1 sm=1 tr=0 ts=6a377d48 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=pGLkceISAAAA:8 a=JfrnYn6hAAAA:8 a=EUspDBNiAAAA:8 a=51h55azOcfVxMhagxa8A:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 a=1CNFftbPRP8L7MoqJWF3:22 X-Proofpoint-ORIG-GUID: RmQtBd2YBb58EVKMmMMRnt64gsZjJPCs X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjIxMDA1NiBTYWx0ZWRfX0O1YfFtq9APM aLrV52OZKfs4WJ53wzOBIt9AGWidUy0D8HiuGr6rRS1AzrzH9D374vZ+pL89JAqs2o8pf2x5O2N +N/08MsAeKUtxVLsprAj1DYz4fVRL7lOx7Q1zJrpl08HS9s4rRfKLjAHV8ecamedeVO05UXTkix P8+TU7y6jIKEaTNnD4z+FnqFqFkjMt9O14WDNJbZYkgSTJviWSrU+IW5OJiLbbyyCPUMqyDL3vV FUBGZcYODUckZXV93Otqhh3C9L+5Y3/TIxs1ESqiYrN6r3P2exrkCRDZTC38Bfeq01rLZ8Bq2xF ed19JreiVoy6wAV4UCgaviOqLmkm42Xq9pPUHn8qIqT54mpYoxASFJMP9TakY2h01ANYiRVlidA ek9S5a2+N+pley81tLlMrg09QFAiSOc1Yxw46yI1HUjMVRjUqDp2AK5LjJAkPsrm13G6p98089G 9QK8EVItyAgvXg1rGvQ== X-Proofpoint-GUID: RmQtBd2YBb58EVKMmMMRnt64gsZjJPCs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-20_04,2026-06-18_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 bulkscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606210056 On 6/21/2026 11:52 AM, Randy Dunlap wrote: > > > On 6/20/26 7:25 PM, wangxiaodong wrote: >> The example shell command for setting ondemand's sampling_rate wraps an >> arithmetic expansion $((...)) in command-substitution backticks. The >> arithmetic result is then executed as a command, which fails and writes >> an empty value. Drop the surrounding backticks so the computed value is >> passed to echo as intended. >> >> Signed-off-by: wangxiaodong >> --- >> Documentation/admin-guide/pm/cpufreq.rst | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/Documentation/admin-guide/pm/cpufreq.rst b/Documentation/admin-guide/pm/cpufreq.rst >> index 8831cface585..34baf20cc202 100644 >> --- a/Documentation/admin-guide/pm/cpufreq.rst >> +++ b/Documentation/admin-guide/pm/cpufreq.rst >> @@ -497,7 +497,7 @@ This governor exposes the following tunables: >> represented by it to be 1.5 times as high as the transition latency >> (the default):: >> >> - # echo `$(($(cat cpuinfo_transition_latency) * 3 / 2))` > ondemand/sampling_rate >> + # echo $(($(cat cpuinfo_transition_latency) * 3 / 2)) > ondemand/sampling_rate > > Ugh. Thanks. > Reviewed-by: Randy Dunlap > > and possibly: > Fixes: e54ac586674d ("cpufreq: editing corrections to cpufreq.rst") Thanks Randy, Just to back up Randy's Fixes suggestion, the line evolved as follows (most recent first): 2025/04/04 e54ac586674d: #echo `$((.. * 3 / 2))` > (trailing ` added) 2024/10/17 29dcbea92460: #echo `$((.. * 3 / 2)) > (still dangling `) 2017/03/13 2a0e49279850: #echo `$((.. * 750 / 1000)) > (dangling leading `) The stray backtick can be traced back to 2a0e49279850, but it was just a dangling backtick then. The closed command-substitution form fixed here was only reached after e54ac586674d added the trailing backtick. Note that the "750/1000 -> 3/2" change in 29dcbea92460 was not just a doc edit: it reflects an actual change in the kernel's behaviour. So on the older trees the underlying logic - and hence this documented example - is genuinely different, and this patch wouldn't apply cleanly there anyway. Pointing Fixes at 2a0e49279850 therefore wouldn't help backports. So using Fixes: e54ac586674d ("cpufreq: editing corrections to cpufreq.rst") seems reasonable. Either way, the fix is fine to me: Reviewed-by: Zhongqiu Han > >> >> ``up_threshold`` >> If the estimated CPU load is above this value (in percent), the governor > -- Thx and BRs, Zhongqiu Han