diff --git a/kernel/syscall.c b/kernel/syscall.c index 310d7fc1..f8f5225a 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -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(); }