- action->execution.surf_exec = ws_model->extension.workstation.execute(host, computation_amount);
- ws_model->action_data_set(action->execution.surf_exec, action);
- ws_model->set_priority(action->execution.surf_exec, priority);
- ws_model->set_bound(action->execution.surf_exec, bound);
+
+ action->execution.surf_exec = surf_workstation_execute(host, computation_amount);
+ surf_action_set_data(action->execution.surf_exec, action);
+ surf_action_set_priority(action->execution.surf_exec, priority);
+
+ /* Note (hypervisor): for multicore, the bound value being passed to the
+ * surf layer should not be zero (i.e., unlimited). It should be the
+ * capacity of a CPU core. */
+ if (bound == 0)
+ surf_cpu_action_set_bound(action->execution.surf_exec, SIMIX_host_get_speed(host));
+ else
+ surf_cpu_action_set_bound(action->execution.surf_exec, bound);
+
+ if (affinity_mask != 0) {
+ /* just a double check to confirm that this host is the host where this task is running. */
+ xbt_assert(action->execution.host == host);
+ surf_cpu_action_set_affinity(action->execution.surf_exec, host, affinity_mask);
+ }