Re: [PATCH v3] cpufreq: intel_pstate: Reporting reasons why driver prematurely exit

From: Erwan Velu
Date: Tue Feb 12 2019 - 02:12:18 EST



Le 12/02/2019 Ã 00:17, Srinivas Pandruvada a ÃcritÂ:
> [...]
> To know if the intel_pstate in control, you can look at:
> #cat /sys/devices/system/cpu/cpufreq/policy0/scaling_driver
>
> So if it is not loaded and Intel intend to support a processor model
> with intel_pstate, then OEM's platform_power_management policy can
> override. So we can add one pr_info to show that driver can't be loaded
> because of platform
> intel_pstate_platform_pwr_mgmt_exists(), return true.

Agreed.

But I do think the intel_pstate_msrs_not_valid() case also deserves a
pr_warn() as this is a premature exit because of some hardware settings.

> If HWP is used we already have a pr_info. If HWP is present it will
> always be used unless user overrides.
>
> The cases where a memory allocation fails you will see other warnings
> in the system, so don't need to add in driver. Also if someone
> explcitly using kernel command line to either disable or control
> features, user knows what he is doing.
>
> So no need of pr_warn or pr_info except one case for platform mower
> management. The others are debug messages only.

Ack.

I'm sending a v4 this way.

Thanks for the review & discussions.

Erwan,