Re: [PATCH] sched/fair: Use sched_energy_enabled()
From: K Prateek Nayak
Date: Fri Mar 27 2026 - 13:18:01 EST
Hello Vincent,
On 3/27/2026 10:02 PM, Vincent Guittot wrote:
>>> + if (sysctl_sched_energy_aware != sched_energy_enabled())
>>
>> Quick tangential question:
>>
>> Since "sysctl_sched_energy_aware" is initialized to "1", if
>> build_perf_domains() returns false at boot, sysctl_sched_energy_aware
>> and sched_energy_enabled() will go out of sync and reading
>> "/proc/sys/kernel/sched_energy_aware" will still show "1" despite EAS
>> being disabled.
>>
>> Is that okay?
>
> Isn't the call to sched_is_eas_possible() there to prevent this case ?
Ah! pd_init() can never fail (expect for -ENOMEME)
I somehow thought there was more to it. Sorry for the noise.
>>
>> Some sysctls like numa_balancing will show 0 if disabled (by user or
>> due to lack of NUMA) reflecting the real state of system. Should
>> sched_energy_aware do the same?
--
Thanks and Regards,
Prateek