Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
f3cfe970
Commit
f3cfe970
authored
13 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Remove local timer functions
Remove local timer functions and make use of functions in src/common/timers.[ch]
parent
6e18da64
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/sched/backfill/backfill.c
+4
-24
4 additions, 24 deletions
src/plugins/sched/backfill/backfill.c
with
4 additions
and
24 deletions
src/plugins/sched/backfill/backfill.c
+
4
−
24
View file @
f3cfe970
...
@@ -117,8 +117,6 @@ static void _add_reservation(uint32_t start_time, uint32_t end_reserve,
...
@@ -117,8 +117,6 @@ static void _add_reservation(uint32_t start_time, uint32_t end_reserve,
node_space_map_t
*
node_space
,
node_space_map_t
*
node_space
,
int
*
node_space_recs
);
int
*
node_space_recs
);
static
int
_attempt_backfill
(
void
);
static
int
_attempt_backfill
(
void
);
static
void
_diff_tv_str
(
struct
timeval
*
tv1
,
struct
timeval
*
tv2
,
char
*
tv_str
,
int
len_tv_str
);
static
bool
_job_is_completing
(
void
);
static
bool
_job_is_completing
(
void
);
static
void
_load_config
(
void
);
static
void
_load_config
(
void
);
static
bool
_many_pending_rpcs
(
void
);
static
bool
_many_pending_rpcs
(
void
);
...
@@ -157,22 +155,6 @@ static void _dump_node_space_table(node_space_map_t *node_space_ptr)
...
@@ -157,22 +155,6 @@ static void _dump_node_space_table(node_space_map_t *node_space_ptr)
info
(
"========================================="
);
info
(
"========================================="
);
}
}
/*
* _diff_tv_str - build a string showing the time difference between two times
* IN tv1 - start of event
* IN tv2 - end of event
* OUT tv_str - place to put delta time in format "usec=%ld"
* IN len_tv_str - size of tv_str in bytes
*/
static
void
_diff_tv_str
(
struct
timeval
*
tv1
,
struct
timeval
*
tv2
,
char
*
tv_str
,
int
len_tv_str
)
{
long
delta_t
;
delta_t
=
(
tv2
->
tv_sec
-
tv1
->
tv_sec
)
*
1000000
;
delta_t
+=
tv2
->
tv_usec
-
tv1
->
tv_usec
;
snprintf
(
tv_str
,
len_tv_str
,
"usec=%ld"
,
delta_t
);
}
/*
/*
* _job_is_completing - Determine if jobs are in the process of completing.
* _job_is_completing - Determine if jobs are in the process of completing.
* This is a variant of job_is_completing in slurmctld/job_scheduler.c.
* This is a variant of job_is_completing in slurmctld/job_scheduler.c.
...
@@ -394,8 +376,7 @@ extern void backfill_reconfig(void)
...
@@ -394,8 +376,7 @@ extern void backfill_reconfig(void)
/* backfill_agent - detached thread periodically attempts to backfill jobs */
/* backfill_agent - detached thread periodically attempts to backfill jobs */
extern
void
*
backfill_agent
(
void
*
args
)
extern
void
*
backfill_agent
(
void
*
args
)
{
{
struct
timeval
tv1
,
tv2
;
DEF_TIMERS
;
char
tv_str
[
20
];
time_t
now
;
time_t
now
;
double
wait_time
;
double
wait_time
;
static
time_t
last_backfill_time
=
0
;
static
time_t
last_backfill_time
=
0
;
...
@@ -420,15 +401,14 @@ extern void *backfill_agent(void *args)
...
@@ -420,15 +401,14 @@ extern void *backfill_agent(void *args)
!
avail_front_end
()
||
!
_more_work
(
last_backfill_time
))
!
avail_front_end
()
||
!
_more_work
(
last_backfill_time
))
continue
;
continue
;
gettimeofday
(
&
tv1
,
NULL
)
;
START_TIMER
;
lock_slurmctld
(
all_locks
);
lock_slurmctld
(
all_locks
);
while
(
_attempt_backfill
())
;
while
(
_attempt_backfill
())
;
last_backfill_time
=
time
(
NULL
);
last_backfill_time
=
time
(
NULL
);
unlock_slurmctld
(
all_locks
);
unlock_slurmctld
(
all_locks
);
gettimeofday
(
&
tv2
,
NULL
);
END_TIMER
;
_diff_tv_str
(
&
tv1
,
&
tv2
,
tv_str
,
20
);
if
(
debug_flags
&
DEBUG_FLAG_BACKFILL
)
if
(
debug_flags
&
DEBUG_FLAG_BACKFILL
)
info
(
"backfill: completed, %s"
,
tv_str
);
info
(
"backfill: completed, %s"
,
TIME_STR
);
}
}
return
NULL
;
return
NULL
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment