@@ -178,12 +178,17 @@ static bool sugov_cpu_is_busy(struct sugov_cpu *sg_cpu)
{
unsigned long idle_calls = tick_nohz_get_idle_calls_cpu(sg_cpu->cpu);
bool ret = idle_calls == sg_cpu->saved_idle_calls;
+ return ret;
+}
+static void sugov_cpu_is_busy_update(struct sugov_cpu *sg_cpu)
+{
+ unsigned long idle_calls = tick_nohz_get_idle_calls_cpu(sg_cpu->cpu);
sg_cpu->saved_idle_calls = idle_calls;
- return ret;
}
#else
static inline bool sugov_cpu_is_busy(struct sugov_cpu *sg_cpu) { return false; }
+static void sugov_cpu_is_busy_update(struct sugov_cpu *sg_cpu) {}
#endif /* CONFIG_NO_HZ_COMMON */
/**
@@ -503,6 +508,7 @@ static void sugov_update_single(struct update_util_data *hook, u64 time,
return;
busy = sugov_cpu_is_busy(sg_cpu);
+ sugov_cpu_is_busy_update(sg_cpu);
util = sugov_get_util(sg_cpu);
max = sg_cpu->max;