Merge pull request #561 from sched-ext/bpfland-fix-energy-profile-refresh

scx_bpfland: prevent reading energy profile if not available
This commit is contained in:
Andrea Righi 2024-08-25 18:31:34 +02:00 committed by GitHub
commit a469f0f1ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -507,7 +507,7 @@ impl<'a> Scheduler<'a> {
}
fn refresh_sched_domain(&mut self) {
if self.opts.primary_domain.is_empty() {
if self.opts.primary_domain.is_empty() && self.energy_profile != "none" {
let energy_profile = Self::read_energy_profile();
if energy_profile != self.energy_profile {
self.energy_profile = energy_profile.clone();