Re: [RFC PATCH v2 6/8] cpuidle: make fast idle threshold tunable

Li, Aubrey
2017-10-16T06:00:52Z

On 2017/10/14 8:59, Rafael J. Wysocki wrote:
> On Saturday, September 30, 2017 9:20:32 AM CEST Aubrey Li wrote:
>> Add a knob to make fast idle threshold tunable
>>
>> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
>
> I first of all am not sure about the need to add a tunable for this at all
> in the first place.

Actually I think a fixed value(10) might be good enough but not quite sure
if there is a requirement to tune it for different scenario, for example even
if the predicted idle interval is 100x overhead, I still want a fast path for
a better benchmark score?

>> @@ -1229,6 +1230,17 @@ static struct ctl_table kern_table[] = {
>> .extra2 = &one,
>> },
>> #endif
>> +#ifdef CONFIG_CPU_IDLE
>> + {
>> + .procname = "fast_idle_ratio",
>> + .data = &sysctl_fast_idle_ratio,
>> + .maxlen = sizeof(int),
>> + .mode = 0644,
>> + .proc_handler = proc_dointvec_minmax,
>> + .extra1 = &one,
>> + .extra2 = &one_hundred,
>> + },
>> +#endif
>> { }
>> };
>>
>
> And if there is a good enough reason to add it, shouldn't the tunable be
> there in the cpuidle framework?
>
sure, if it makes sense, I'll move it into cpuidle/sysfs.c

Thanks,
-Aubrey