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:
Masamichi Takagi
2018-08-20 10:13:24 +09:00
parent cd00fc3a78
commit 22c6c5c736

View File

@ -332,6 +332,7 @@ long do_syscall(struct syscall_request *req, int cpu, int pid)
v = get_this_cpu_local_var();
if (v->flags & CPU_FLAG_NEED_RESCHED ||
v->runq_len > 1 ||
req->number == __NR_sched_setaffinity) {
do_schedule = 1;
}