Re: [PATCH] cpufreq: Remove references to 10ms min sampling rate

From: Rafael J. Wysocki
Date: Thu Feb 22 2024 - 14:31:58 EST


On Thu, Feb 22, 2024 at 4:35 PM Pierre Gondois <pierre.gondois@xxxxxxx> wrote:
>
> A minimum sampling rate value of 10ms was introduced in:
> commit cef9615a853e ("[CPUFREQ] ondemand: Uncouple minimal sampling rate from HZ in NO_HZ case")
>
> The use of this value was removed in:
> commit ed4676e25463 ("cpufreq: Replace "max_transition_latency" with "dynamic_switching"")
>
> Remove:
> - a comment referencing this value
> - an unused macro associated to this value
>
> Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
> ---
> drivers/cpufreq/cpufreq_ondemand.c | 1 -
> include/linux/cpufreq.h | 4 +---
> 2 files changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
> index c52d19d67557..a7c38b8b3e78 100644
> --- a/drivers/cpufreq/cpufreq_ondemand.c
> +++ b/drivers/cpufreq/cpufreq_ondemand.c
> @@ -22,7 +22,6 @@
> #define DEF_SAMPLING_DOWN_FACTOR (1)
> #define MAX_SAMPLING_DOWN_FACTOR (100000)
> #define MICRO_FREQUENCY_UP_THRESHOLD (95)
> -#define MICRO_FREQUENCY_MIN_SAMPLE_RATE (10000)
> #define MIN_FREQUENCY_UP_THRESHOLD (1)
> #define MAX_FREQUENCY_UP_THRESHOLD (100)
>
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index 8b9026031a28..625949a1869d 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -568,9 +568,7 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div,
>
> /*
> * The polling frequency depends on the capability of the processor. Default
> - * polling frequency is 1000 times the transition latency of the processor. The
> - * ondemand governor will work on any processor with transition latency <= 10ms,
> - * using appropriate sampling rate.
> + * polling frequency is 1000 times the transition latency of the processor.
> */
> #define LATENCY_MULTIPLIER (1000)
>
> --

Applied as 6.9 material, thanks!