Skip to content

Commit

Permalink
qmanager/dfu: satisfiable but unreservable job support
Browse files Browse the repository at this point in the history
problem: jobs that are satisfiable but unreservable, in queues that use
reservation, would fail with either a match failure or an EINVAL return
from resource.  This seems to only happen when `schedule` returns -1,
an errno of ENOENT and the `at` value equal to the end of the graph.

Solution: Rather than making that EINVAL, it now passes out EBUSY, which
causes the new code for blocked constraints to pull the job out of
pending and place it in blocked.  To allow the job to proceed, we move
blocked jobs back into the pending queue whenever a job is removed from
the queue due to completion or cancellation. We probably consider them
more than necessary, but this seems to solve the issue and still
preserves the performance improvement.
  • Loading branch information
trws committed May 6, 2024
1 parent 9185784 commit ca65c6e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion resource/traversers/dfu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,14 @@ int dfu_traverser_t::run (Jobspec::Jobspec &jobspec,
detail::dfu_impl_t::update ();
} else if ( (rc = schedule (jobspec, meta, x, op, root, dfv)) == 0) {
*at = meta.at;
if (*at < 0 or *at >= graph_end) {
if (*at == graph_end) {
detail::dfu_impl_t::reset_exclusive_resource_types
(exclusive_types);
// no schedulable point found even at the end of the time, return EBUSY
errno = EBUSY;
return -1;
}
if (*at < 0 or *at > graph_end) {
detail::dfu_impl_t::reset_exclusive_resource_types
(exclusive_types);
errno = EINVAL;
Expand Down

0 comments on commit ca65c6e

Please sign in to comment.