Skip to content
Snippets Groups Projects
Commit 9b1bbb1a authored by Morris Jette's avatar Morris Jette
Browse files

backfill - minor code re-order

This reording of some code results in cleaner logic
parent abdc4bd3
No related branches found
No related tags found
No related merge requests found
...@@ -1130,8 +1130,14 @@ static int _attempt_backfill(void) ...@@ -1130,8 +1130,14 @@ static int _attempt_backfill(void)
job_ptr->time_limit = orig_time_limit; job_ptr->time_limit = orig_time_limit;
} }
if (later_start && start_time = job_ptr->start_time;
(job_ptr->start_time > (later_start+backfill_resolution))) { end_reserve = job_ptr->start_time + (time_limit * 60);
start_time = (start_time / backfill_resolution) *
backfill_resolution;
end_reserve = (end_reserve / backfill_resolution) *
backfill_resolution;
if (later_start && (start_time > later_start)) {
/* Try later when some nodes currently reserved for /* Try later when some nodes currently reserved for
* pending jobs are free */ * pending jobs are free */
job_ptr->start_time = 0; job_ptr->start_time = 0;
...@@ -1151,12 +1157,6 @@ static int _attempt_backfill(void) ...@@ -1151,12 +1157,6 @@ static int _attempt_backfill(void)
break; break;
} }
start_time = job_ptr->start_time;
end_reserve = job_ptr->start_time + (time_limit * 60);
start_time = (start_time / backfill_resolution) *
backfill_resolution;
end_reserve = (end_reserve / backfill_resolution) *
backfill_resolution;
if ((job_ptr->start_time > now) && if ((job_ptr->start_time > now) &&
_test_resv_overlap(node_space, avail_bitmap, _test_resv_overlap(node_space, avail_bitmap,
start_time, end_reserve)) { start_time, end_reserve)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment