Return error when no core is available
clone returns -EAGAIN when there is no vacant core. In addition, clone tries to use the next vacant hyper-threading core instead of trying to use next vacant hyper-threading core of the next vacant physical core.
This commit is contained in:
@ -1290,6 +1290,9 @@ SYSCALL_DECLARE(clone)
|
||||
(unsigned long)ihk_mc_syscall_sp(ctx));
|
||||
|
||||
cpuid = obtain_clone_cpuid();
|
||||
if (cpuid == -1) {
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
new = clone_process(cpu_local_var(current), ihk_mc_syscall_pc(ctx),
|
||||
ihk_mc_syscall_arg1(ctx) ? ihk_mc_syscall_arg1(ctx) :
|
||||
|
||||
Reference in New Issue
Block a user