kill system call offloading from interrupt_syscall (tid == -1) change to one sided communication
refs #889
This commit is contained in:
@ -1770,6 +1770,9 @@ void __return_syscall(ihk_os_t os, struct ikc_scd_packet *packet,
|
||||
unsigned long phys;
|
||||
struct syscall_response *res;
|
||||
|
||||
if (stid == -1)
|
||||
return;
|
||||
|
||||
phys = ihk_device_map_memory(ihk_os_to_dev(os),
|
||||
packet->resp_pa, sizeof(*res));
|
||||
res = ihk_device_map_virtual(ihk_os_to_dev(os),
|
||||
|
||||
@ -140,11 +140,8 @@ static void send_syscall(struct syscall_request *req, int cpu, int pid, struct s
|
||||
|
||||
if(req->number == __NR_exit_group ||
|
||||
req->number == __NR_kill){ // interrupt syscall
|
||||
|
||||
/* XXX: is this really going to work if multiple processes
|
||||
* exit/receive signals at the same time?? */
|
||||
if (req->number == __NR_kill) {
|
||||
req->rtid = -1;
|
||||
req->rtid = -1; // no response
|
||||
pid = req->args[0];
|
||||
}
|
||||
if (req->number == __NR_gettid)
|
||||
@ -213,6 +210,11 @@ long do_syscall(struct syscall_request *req, int cpu, int pid)
|
||||
res.req_thread_status = IHK_SCD_REQ_THREAD_SPINNING;
|
||||
send_syscall(req, cpu, pid, &res);
|
||||
|
||||
if (req->rtid == -1) {
|
||||
rc = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
dkprintf("%s: syscall num: %d waiting for Linux.. \n",
|
||||
__FUNCTION__, req->number);
|
||||
|
||||
@ -381,6 +383,8 @@ if(req->number == __NR_sched_setaffinity)kprintf("do_syscall 2 offload=%d\n", th
|
||||
terminate(0, SIGKILL);
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
#ifdef PROFILE_ENABLE
|
||||
if (req->number < PROFILE_SYSCALL_MAX) {
|
||||
profile_event_add(profile_syscall2offload(req->number),
|
||||
|
||||
Reference in New Issue
Block a user