uti: Workaround not to share CPU with OpenMP threads
* Assign uti thread to the last idle CPU so that it's not shared with an OpenMP thread Change-Id: Ia42cae056ce81fde9b6dab6286b39a52f3c9e172
This commit is contained in:
@ -2445,12 +2445,6 @@ unsigned long do_fork(int clone_flags, unsigned long newsp,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
cpuid = obtain_clone_cpuid(&old->cpu_set);
|
||||
if (cpuid == -1) {
|
||||
kprintf("do_fork,core not available\n");
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
/* N-th creation put the new on Linux CPU. It's turned off when zero is
|
||||
set to uti_thread_rank. */
|
||||
if (oldproc->uti_thread_rank) {
|
||||
@ -2463,6 +2457,12 @@ unsigned long do_fork(int clone_flags, unsigned long newsp,
|
||||
}
|
||||
}
|
||||
|
||||
cpuid = obtain_clone_cpuid(&old->cpu_set, old->mod_clone == SPAWN_TO_REMOTE && oldproc->uti_use_last_cpu);
|
||||
if (cpuid == -1) {
|
||||
kprintf("do_fork,core not available\n");
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
new = clone_thread(old, curpc,
|
||||
newsp ? newsp : cursp, clone_flags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user