Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Reapply 73f29d2 ("cpufreq: schedutil: Ignore work_in_progress")
Browse files Browse the repository at this point in the history
Blindly ignoring frequency updates because of work_in_progress can leave
the CPUs at the wrong frequency for a long time. It's better to update the
frequency immediately than wait for a future event that might take a long
time to come. The irq_work code already ignores double queuing of work. So,
that part of the code is still safe when the work_in_progress flag is
ignored.

Change-Id: Id0b3711314dfbfa18b5f4bce30a239ee3cf962d6
Signed-off-by: Vikram Mulukutla <[email protected]>
Signed-off-by: Saravana Kannan <[email protected]>
Signed-off-by: Rohit Gupta <[email protected]>
[[email protected]: Port to 4.19]
Signed-off-by: Jonathan Avila <[email protected]>
Signed-off-by: Adam W. Willis <[email protected]>
Signed-off-by: Yaroslav Furman <[email protected]>
  • Loading branch information
Vikram Mulukutla authored and YaroST12 committed Jul 27, 2020
1 parent fb22ead commit ea7f18d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions kernel/sched/cpufreq_schedutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,9 @@ static void sugov_deferred_update(struct sugov_policy *sg_policy, u64 time,
if (!sugov_update_next_freq(sg_policy, time, next_freq))
return;

if (!sg_policy->work_in_progress) {
if (use_pelt())
sg_policy->work_in_progress = true;
sched_irq_work_queue(&sg_policy->irq_work);
}
if (use_pelt())
sg_policy->work_in_progress = true;
sched_irq_work_queue(&sg_policy->irq_work);
}

/**
Expand Down

0 comments on commit ea7f18d

Please sign in to comment.