mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm: mpdecision: wait at least 100ms between cpu hotremoves
To avoid spending a lot of time at once in the cpu hotremove path, do not perform multiple hotremoves back to back. Change-Id: I78a643f73718e4e08786193c71bbe2237aa790d2 Signed-off-by: Steve Muckle <smuckle@codeaurora.org> (cherry picked from commit 9c0aa035f7aeac1b1039125bf27d51d11861fa03)
This commit is contained in:
parent
b84423dc28
commit
b4f38f5378
1 changed files with 10 additions and 8 deletions
|
@ -123,6 +123,7 @@ static struct hp_latency hp_latencies;
|
|||
|
||||
static unsigned long last_nr;
|
||||
static int num_present_hundreds;
|
||||
static ktime_t last_down_time;
|
||||
|
||||
#define RQ_AVG_INSIGNIFICANT_BITS 3
|
||||
static bool ok_to_update_tz(int nr, int last_nr)
|
||||
|
@ -380,14 +381,15 @@ restart:
|
|||
}
|
||||
}
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
if (!(atomic_read(&msm_mpd.algo_cpu_mask) & (1 << cpu))
|
||||
&& cpu_online(cpu)) {
|
||||
bring_down_cpu(cpu);
|
||||
if (!cpu_online(cpu))
|
||||
goto restart;
|
||||
}
|
||||
}
|
||||
if (ktime_to_ns(ktime_sub(ktime_get(), last_down_time)) >
|
||||
100 * NSEC_PER_MSEC)
|
||||
for_each_possible_cpu(cpu)
|
||||
if (!(atomic_read(&msm_mpd.algo_cpu_mask) &
|
||||
(1 << cpu)) && cpu_online(cpu)) {
|
||||
bring_down_cpu(cpu);
|
||||
last_down_time = ktime_get();
|
||||
break;
|
||||
}
|
||||
msm_mpd.hpupdate = HPUPDATE_WAITING;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue