mcctrl: use IKC packet pools

This commit is contained in:
Balazs Gerofi
2016-08-12 12:26:14 +09:00
parent daca522d25
commit a01ae91051
3 changed files with 9 additions and 4 deletions

View File

@ -617,7 +617,8 @@ retry_alloc:
task_tgid_vnr(current), task_tgid_vnr(current),
task_pid_vnr(current), task_pid_vnr(current),
packet->req.number); packet->req.number);
kfree(packet); ihk_ikc_release_packet((struct ihk_ikc_free_packet *)packet,
(usrdata->channels + packet->ref)->c);
goto retry; goto retry;
} }
@ -651,6 +652,9 @@ retry_alloc:
return 0; return 0;
} }
ihk_ikc_release_packet((struct ihk_ikc_free_packet *)packet,
(usrdata->channels + packet->ref)->c);
if (mcctrl_delete_per_thread_data(ppd, current) < 0) { if (mcctrl_delete_per_thread_data(ppd, current) < 0) {
kprintf("%s: error deleting per-thread data\n", __FUNCTION__); kprintf("%s: error deleting per-thread data\n", __FUNCTION__);
return -EINVAL; return -EINVAL;
@ -798,7 +802,8 @@ long mcexec_ret_syscall(ihk_os_t os, struct syscall_ret_desc *__user arg)
__return_syscall(os, packet, ret.ret, task_pid_vnr(current)); __return_syscall(os, packet, ret.ret, task_pid_vnr(current));
/* Free packet */ /* Free packet */
kfree(packet); ihk_ikc_release_packet((struct ihk_ikc_free_packet *)packet,
(usrdata->channels + packet->ref)->c);
return 0; return 0;
} }

View File

@ -116,7 +116,7 @@ static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
* mcexec_ret_syscall(), for the rest, free it here. * mcexec_ret_syscall(), for the rest, free it here.
*/ */
if (msg != SCD_MSG_SYSCALL_ONESIDE) { if (msg != SCD_MSG_SYSCALL_ONESIDE) {
kfree(pisp); ihk_ikc_release_packet((struct ihk_ikc_free_packet *)__packet, c);
} }
return 0; return 0;
} }

View File

@ -687,7 +687,7 @@ static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
} }
kfree(packet); ihk_ikc_release_packet((struct ihk_ikc_free_packet *)packet, c);
return ret; return ret;
} }