From 5e44c9c9f9101e6d9163e3f2d36d4738394a33dd Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Tue, 17 Sep 2019 13:57:43 +0900 Subject: [PATCH] epoll_wait(): make sure to schedule in offload Change-Id: I435416cb0ac005a03cd995bf1aae75c9ce7b2082 --- arch/arm64/kernel/include/syscall_list.h | 1 + kernel/syscall.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/arch/arm64/kernel/include/syscall_list.h b/arch/arm64/kernel/include/syscall_list.h index 35d678ee..b8eb0158 100644 --- a/arch/arm64/kernel/include/syscall_list.h +++ b/arch/arm64/kernel/include/syscall_list.h @@ -143,3 +143,4 @@ SYSCALL_HANDLED(1045, signalfd) SYSCALL_DELEGATED(1049, stat) SYSCALL_DELEGATED(1060, getpgrp) SYSCALL_HANDLED(1062, time) +SYSCALL_DELEGATED(1069, epoll_wait) diff --git a/kernel/syscall.c b/kernel/syscall.c index 0fbb05e7..88a59c8b 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -242,6 +242,10 @@ long do_syscall(struct syscall_request *req, int cpu) unsigned long flags; DECLARE_WAITQ_ENTRY(scd_wq_entry, cpu_local_var(current)); + if (req->number == __NR_epoll_wait || + req->number == __NR_epoll_pwait) + goto schedule; + cpu_pause(); /* Spin if not preemptable */ @@ -270,6 +274,7 @@ long do_syscall(struct syscall_request *req, int cpu) continue; } +schedule: flags = cpu_disable_interrupt_save(); /* Try to sleep until notified */