epoll, ppoll: deschedule on offload, don't do it when exiting system call
Change-Id: Ib1d0553ca5c50f4de055a1a5fe40b406c9c26dc7
This commit is contained in:
@ -243,7 +243,8 @@ long do_syscall(struct syscall_request *req, int cpu)
|
||||
DECLARE_WAITQ_ENTRY(scd_wq_entry, cpu_local_var(current));
|
||||
|
||||
if (req->number == __NR_epoll_wait ||
|
||||
req->number == __NR_epoll_pwait)
|
||||
req->number == __NR_epoll_pwait ||
|
||||
req->number == __NR_ppoll)
|
||||
goto schedule;
|
||||
|
||||
cpu_pause();
|
||||
@ -10280,7 +10281,11 @@ long syscall(int num, ihk_mc_user_context_t *ctx)
|
||||
}
|
||||
#endif // PROFILE_ENABLE
|
||||
|
||||
if (smp_load_acquire(&v->flags) & CPU_FLAG_NEED_RESCHED) {
|
||||
/* Do not deschedule when returning from an event (e.g., MPI) */
|
||||
if (!(num == __NR_epoll_wait ||
|
||||
num == __NR_epoll_pwait ||
|
||||
num == __NR_ppoll) &&
|
||||
smp_load_acquire(&v->flags) & CPU_FLAG_NEED_RESCHED) {
|
||||
check_need_resched();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user