do_syscall: Call schedule() when runq_len > 1
This optimization make the offloading thread quickly yield to another thread. Without this, it yileded only after the interval timer set the rescheduling flag. Change-Id: Ida3b17ed94782d5d1af0185a96b1f50d9db8d244
This commit is contained in:
@@ -332,6 +332,7 @@ long do_syscall(struct syscall_request *req, int cpu, int pid)
|
|||||||
v = get_this_cpu_local_var();
|
v = get_this_cpu_local_var();
|
||||||
|
|
||||||
if (v->flags & CPU_FLAG_NEED_RESCHED ||
|
if (v->flags & CPU_FLAG_NEED_RESCHED ||
|
||||||
|
v->runq_len > 1 ||
|
||||||
req->number == __NR_sched_setaffinity) {
|
req->number == __NR_sched_setaffinity) {
|
||||||
do_schedule = 1;
|
do_schedule = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user