From cdffc5e853d93f3e89b1ee9f4c3f2acff5e525a7 Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Sun, 8 Jan 2017 11:56:23 +0900 Subject: [PATCH] do_syscall(): eliminate centralized lock for exit/kill code path (use IKC2 thread pool) --- kernel/init.c | 3 --- kernel/syscall.c | 13 ------------- 2 files changed, 16 deletions(-) diff --git a/kernel/init.c b/kernel/init.c index 2955df82..7b58efe2 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -336,11 +336,8 @@ static void post_init(void) } if (find_command_line("hidos")) { - extern ihk_spinlock_t syscall_lock; - init_host_syscall_channel(); init_host_syscall_channel2(); - ihk_mc_spinlock_init(&syscall_lock); } arch_setup_vdso(); diff --git a/kernel/syscall.c b/kernel/syscall.c index 8b058ef4..b6474c69 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -267,16 +267,12 @@ static void send_syscall(struct syscall_request *req, int cpu, int pid, struct s #endif } -ihk_spinlock_t syscall_lock; - long do_syscall(struct syscall_request *req, int cpu, int pid) { struct syscall_response res; struct syscall_request req2 IHK_DMA_ALIGN; int error; long rc; - int islock = 0; - unsigned long irqstate; struct thread *thread = cpu_local_var(current); struct process *proc = thread->proc; #ifdef TRACK_SYSCALLS @@ -288,7 +284,6 @@ long do_syscall(struct syscall_request *req, int cpu, int pid) ihk_mc_get_processor_id(), req->number); - irqstate = 0; /* for avoidance of warning */ barrier(); if(req->number != __NR_exit_group){ @@ -299,11 +294,6 @@ long do_syscall(struct syscall_request *req, int cpu, int pid) ++thread->in_syscall_offload; } - if(req->number == __NR_exit_group || - req->number == __NR_kill){ // interrupt syscall - islock = 1; - irqstate = ihk_mc_spinlock_lock(&syscall_lock); - } /* The current thread is the requester and any thread from * the pool may serve the request */ req->rtid = cpu_local_var(current)->tid; @@ -394,9 +384,6 @@ long do_syscall(struct syscall_request *req, int cpu, int pid) __FUNCTION__, req->number, res.ret); rc = res.ret; - if(islock){ - ihk_mc_spinlock_unlock(&syscall_lock, irqstate); - } if(req->number != __NR_exit_group){ --thread->in_syscall_offload;