* Ontime task is very sensitive to performance because it is usually the
* main task of application. Therefore, it has the highest priority.
*/
- target_cpu = ontime_task_wakeup(p);
+ target_cpu = ontime_task_wakeup(p, sync);
if (cpu_selected(target_cpu)) {
strcpy(state, "ontime migration");
goto out;
extern struct kobject *ems_kobj;
-extern int ontime_task_wakeup(struct task_struct *p);
+extern int ontime_task_wakeup(struct task_struct *p, int sync);
extern int select_perf_cpu(struct task_struct *p);
extern int global_boosting(struct task_struct *p);
extern int global_boosted(void);
spin_unlock(&om_lock);
}
-int ontime_task_wakeup(struct task_struct *p)
+int ontime_task_wakeup(struct task_struct *p, int sync)
{
struct cpumask fit_cpus;
int dst_cpu, src_cpu = task_cpu(p);
if (cpumask_test_cpu(MIN_CAPACITY_CPU, &fit_cpus))
return -1;
+ /* If this cpu is fit and sync, wake up on this cpu */
+ if (sysctl_sched_sync_hint_enable && sync) {
+ int cpu = smp_processor_id();
+
+ if (cpumask_test_cpu(cpu, &p->cpus_allowed)
+ && cpumask_test_cpu(cpu, &fit_cpus)) {
+ trace_ems_ontime_task_wakeup(p, src_cpu, cpu, "ontime-sync wakeup");
+ return cpu;
+ }
+ }
+
dst_cpu = ontime_select_target_cpu(p, &fit_cpus);
if (cpu_selected(dst_cpu)) {
trace_ems_ontime_task_wakeup(p, src_cpu, dst_cpu, "ontime wakeup");