|
Lines 127-132
static int backfill_resolution = BACKFILL_RESOLUTION;
Link Here
|
| 127 |
static int backfill_window = BACKFILL_WINDOW; |
127 |
static int backfill_window = BACKFILL_WINDOW; |
| 128 |
static int bf_max_job_array_resv = BF_MAX_JOB_ARRAY_RESV; |
128 |
static int bf_max_job_array_resv = BF_MAX_JOB_ARRAY_RESV; |
| 129 |
static int bf_min_age_reserve = 0; |
129 |
static int bf_min_age_reserve = 0; |
|
|
130 |
static uint32_t bf_min_prio_reserve = 0; |
| 130 |
static int max_backfill_job_cnt = 100; |
131 |
static int max_backfill_job_cnt = 100; |
| 131 |
static int max_backfill_job_per_part = 0; |
132 |
static int max_backfill_job_per_part = 0; |
| 132 |
static int max_backfill_job_per_user = 0; |
133 |
static int max_backfill_job_per_user = 0; |
|
Lines 583-588
static void _load_config(void)
Link Here
|
| 583 |
bf_min_age_reserve = 0; |
584 |
bf_min_age_reserve = 0; |
| 584 |
} |
585 |
} |
| 585 |
|
586 |
|
|
|
587 |
bf_min_prio_reserve = 0; |
| 588 |
if (sched_params && |
| 589 |
(tmp_ptr = strstr(sched_params, "bf_min_prio_reserve="))) { |
| 590 |
int64_t min_prio = (int64_t) atoll(tmp_ptr + 20); |
| 591 |
if (min_prio < 0) { |
| 592 |
error("Invalid SchedulerParameters bf_min_prio_reserve: %"PRIi64, |
| 593 |
min_prio); |
| 594 |
} else { |
| 595 |
bf_min_prio_reserve = (uint32_t) min_prio; |
| 596 |
} |
| 597 |
} |
| 598 |
|
| 586 |
/* bf_continue makes backfill continue where it was if interrupted |
599 |
/* bf_continue makes backfill continue where it was if interrupted |
| 587 |
*/ |
600 |
*/ |
| 588 |
if (sched_params && (strstr(sched_params, "bf_continue"))) { |
601 |
if (sched_params && (strstr(sched_params, "bf_continue"))) { |
|
Lines 825-831
static int _attempt_backfill(void)
Link Here
|
| 825 |
struct timeval start_tv; |
838 |
struct timeval start_tv; |
| 826 |
uint32_t test_array_job_id = 0; |
839 |
uint32_t test_array_job_id = 0; |
| 827 |
uint32_t test_array_count = 0; |
840 |
uint32_t test_array_count = 0; |
| 828 |
uint32_t acct_max_nodes, wait_reason = 0; |
841 |
uint32_t acct_max_nodes, wait_reason = 0, job_no_reserve; |
| 829 |
bool resv_overlap = false; |
842 |
bool resv_overlap = false; |
| 830 |
|
843 |
|
| 831 |
bf_sleep_usec = 0; |
844 |
bf_sleep_usec = 0; |
|
Lines 984-989
static int _attempt_backfill(void)
Link Here
|
| 984 |
|
997 |
|
| 985 |
part_ptr = job_queue_rec->part_ptr; |
998 |
part_ptr = job_queue_rec->part_ptr; |
| 986 |
job_ptr->part_ptr = part_ptr; |
999 |
job_ptr->part_ptr = part_ptr; |
|
|
1000 |
job_ptr->priority = job_queue_rec->priority; |
| 987 |
if (job_ptr->state_reason == FAIL_ACCOUNT) { |
1001 |
if (job_ptr->state_reason == FAIL_ACCOUNT) { |
| 988 |
slurmdb_assoc_rec_t assoc_rec; |
1002 |
slurmdb_assoc_rec_t assoc_rec; |
| 989 |
memset(&assoc_rec, 0, sizeof(slurmdb_assoc_rec_t)); |
1003 |
memset(&assoc_rec, 0, sizeof(slurmdb_assoc_rec_t)); |
|
Lines 1036-1041
static int _attempt_backfill(void)
Link Here
|
| 1036 |
!acct_policy_job_runnable_pre_select(job_ptr)) |
1050 |
!acct_policy_job_runnable_pre_select(job_ptr)) |
| 1037 |
continue; |
1051 |
continue; |
| 1038 |
|
1052 |
|
|
|
1053 |
job_no_reserve = 0; |
| 1054 |
if (bf_min_prio_reserve && |
| 1055 |
(job_ptr->priority < bf_min_prio_reserve)) { |
| 1056 |
job_no_reserve = TEST_NOW_ONLY; |
| 1057 |
} else if (bf_min_age_reserve && job_ptr->details->begin_time) { |
| 1058 |
pend_time = difftime(time(NULL), |
| 1059 |
job_ptr->details->begin_time); |
| 1060 |
if (pend_time < bf_min_age_reserve) |
| 1061 |
job_no_reserve = TEST_NOW_ONLY; |
| 1062 |
} |
| 1063 |
|
| 1039 |
orig_start_time = job_ptr->start_time; |
1064 |
orig_start_time = job_ptr->start_time; |
| 1040 |
orig_time_limit = job_ptr->time_limit; |
1065 |
orig_time_limit = job_ptr->time_limit; |
| 1041 |
xfree(job_queue_rec); |
1066 |
xfree(job_queue_rec); |
|
Lines 1357-1365
next_task:
Link Here
|
| 1357 |
if (debug_flags & DEBUG_FLAG_BACKFILL_MAP) |
1382 |
if (debug_flags & DEBUG_FLAG_BACKFILL_MAP) |
| 1358 |
_dump_job_test(job_ptr, avail_bitmap, start_res); |
1383 |
_dump_job_test(job_ptr, avail_bitmap, start_res); |
| 1359 |
job_ptr->bit_flags |= BACKFILL_TEST; |
1384 |
job_ptr->bit_flags |= BACKFILL_TEST; |
|
|
1385 |
job_ptr->bit_flags |= job_no_reserve; /* 0 or TEST_NOW_ONLY */ |
| 1360 |
j = _try_sched(job_ptr, &avail_bitmap, min_nodes, max_nodes, |
1386 |
j = _try_sched(job_ptr, &avail_bitmap, min_nodes, max_nodes, |
| 1361 |
req_nodes, exc_core_bitmap); |
1387 |
req_nodes, exc_core_bitmap); |
| 1362 |
job_ptr->bit_flags &= ~BACKFILL_TEST; |
1388 |
job_ptr->bit_flags &= ~BACKFILL_TEST; |
|
|
1389 |
job_ptr->bit_flags &= ~TEST_NOW_ONLY; |
| 1363 |
|
1390 |
|
| 1364 |
now = time(NULL); |
1391 |
now = time(NULL); |
| 1365 |
if (j != SLURM_SUCCESS) { |
1392 |
if (j != SLURM_SUCCESS) { |
|
Lines 1512-1524
next_task:
Link Here
|
| 1512 |
_set_job_time_limit(job_ptr, orig_time_limit); |
1539 |
_set_job_time_limit(job_ptr, orig_time_limit); |
| 1513 |
} |
1540 |
} |
| 1514 |
|
1541 |
|
| 1515 |
if ((job_ptr->start_time > now) && |
1542 |
if ((job_ptr->start_time > now) && (job_no_reserve != 0)) |
| 1516 |
(bf_min_age_reserve && job_ptr->details->begin_time)) { |
1543 |
continue; |
| 1517 |
pend_time = difftime(time(NULL), |
|
|
| 1518 |
job_ptr->details->begin_time); |
| 1519 |
if (pend_time < bf_min_age_reserve) |
| 1520 |
continue; |
| 1521 |
} |
| 1522 |
|
1544 |
|
| 1523 |
if (later_start && (job_ptr->start_time > later_start)) { |
1545 |
if (later_start && (job_ptr->start_time > later_start)) { |
| 1524 |
/* Try later when some nodes currently reserved for |
1546 |
/* Try later when some nodes currently reserved for |