Skip to content

Commit

Permalink
run pollers in cpu_process_local_jobs() if running job synchonously
Browse files Browse the repository at this point in the history
In the event we only have 1 CPU thread, we run asynchronous jobs
synchronously, and while we wait for them to finish, we run pollers.

However, if the jobs themselves don't call pollers (e.g. by time_wait())
then we'll end up in long periods of not running pollers at all.

To work around this, explicitly run pollers when we're the only
CPU thread (i.e. when we run the job synchronously).

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
stewartsmith committed Nov 24, 2016
1 parent 9fcb109 commit ecac294
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ void cpu_process_local_jobs(void)
if (cpu == this_cpu()) {
prlog_once(PR_DEBUG, "Processing jobs synchronously\n");
cpu_process_jobs();
opal_run_pollers();
}
}

Expand Down

0 comments on commit ecac294

Please sign in to comment.