partitioned execution: pass process rank to LWK
Cherry-pick of d2d134d5e6a4b16a34d55d31b14614a2a91ecf47 Conflicts: kernel/include/process.h
This commit is contained in:
committed by
Masamichi Takagi
parent
4439b04d9f
commit
a697f5e98d
@ -654,6 +654,7 @@ static long mcexec_get_cpuset(ihk_os_t os, unsigned long arg)
|
||||
wake_up_interruptible(&pli_next->pli_wq);
|
||||
/* Reset process counter */
|
||||
pe->nr_processes_left = pe->nr_processes;
|
||||
pe->process_rank = 0;
|
||||
}
|
||||
|
||||
/* Wait for the rest if not the last or if the last but
|
||||
@ -885,6 +886,15 @@ next_cpu:
|
||||
goto put_and_unlock_out;
|
||||
}
|
||||
|
||||
/* Copy rank */
|
||||
if (copy_to_user(req.process_rank, &pe->process_rank,
|
||||
sizeof(int))) {
|
||||
printk("%s: error copying process rank to user\n",
|
||||
__FUNCTION__);
|
||||
ret = -EINVAL;
|
||||
goto put_and_unlock_out;
|
||||
}
|
||||
|
||||
/* mcexec NUMA to bind to */
|
||||
mcexec_linux_numa = cpu_to_node(mckernel_cpu_2_linux_cpu(udp, cpu));
|
||||
if (copy_to_user(req.mcexec_linux_numa, &mcexec_linux_numa,
|
||||
@ -932,6 +942,7 @@ next_cpu:
|
||||
}
|
||||
/* Otherwise wake up next process in list */
|
||||
else {
|
||||
++pe->process_rank;
|
||||
pli_next = list_first_entry(&pe->pli_list,
|
||||
struct process_list_item, list);
|
||||
list_del(&pli_next->list);
|
||||
|
||||
Reference in New Issue
Block a user