From 712a15ce6c5fdf9c5156a5954cd6c3551547037c Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 30 Aug 2024 18:50:51 +0300 Subject: speed up ipc_resp a bit + Skip unwinding stack and just jump directly to userspace --- src/uapi/ipc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/uapi') diff --git a/src/uapi/ipc.c b/src/uapi/ipc.c index 0fba899..5f2aad1 100644 --- a/src/uapi/ipc.c +++ b/src/uapi/ipc.c @@ -283,13 +283,15 @@ static void leave_rpc(struct tcb *t, struct sys_ret a) if (t->notify_flags) notify(t, 0); - if (is_rpc(t)) { + if (is_rpc(t)) use_vmem(t->rpc.vmem); - return; - } + else + use_vmem(t->proc.vmem); - /* notification didn't take, return back to process normally */ - use_vmem(t->proc.vmem); + if (!ctx->notify) { + bkl_unlock(); + ret_userspace_partial(); + } } /** -- cgit v1.3