save works
This commit is contained in:
parent
b1faeb94b6
commit
b748e30d20
35 changed files with 1247 additions and 2149 deletions
|
|
@ -114,8 +114,8 @@ static int xcesched_push_configs(cluster_t* c)
|
|||
configdata.data.conf4sched->n_hgroups = c->myconf->cluster_config->nhgroups;
|
||||
configdata.data.conf4sched->hgroups = c->myconf->cluster_config->hgroups;
|
||||
#if 0 /* FIXME: we use builtin limit currently */
|
||||
configdata.data.conf4sched->nlimits = c->myconf->cluster_config->nlimits;
|
||||
configdata.data.conf4sched->limits = c->myconf->cluster_config->limits;
|
||||
configdata.data.conf4sched->nlimits = c->myconf->cluster_config->nlimits;
|
||||
configdata.data.conf4sched->limits = c->myconf->cluster_config->limits;
|
||||
#else
|
||||
configdata.data.conf4sched->nlimits = nlimits;
|
||||
configdata.data.conf4sched->limits = &(limits[0]);
|
||||
|
|
@ -204,7 +204,7 @@ static int xcesched_push_workers(cluster_t* c)
|
|||
100);
|
||||
|
||||
/* free up collected resource value which used
|
||||
passed to scheduler
|
||||
passed to scheduler
|
||||
*/
|
||||
for (i = 0; i < workers.n_total; i++) {
|
||||
xce_worker_t* w = workers.workers[i];
|
||||
|
|
@ -248,12 +248,12 @@ static int sched_job_start_fun(int type, int situation, void* data, va_list ap)
|
|||
job_pidinfo_t* info = va_arg(ap, job_pidinfo_t*);
|
||||
int rc = 0;
|
||||
/* clang-format off */
|
||||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedStartJob,
|
||||
.data = {
|
||||
.sched_start_job = info->jobid
|
||||
}
|
||||
};
|
||||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedStartJob,
|
||||
.data = {
|
||||
.sched_start_job = info->jobid
|
||||
}
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
mylock_lock(&(c->sched.lock));
|
||||
|
|
@ -278,12 +278,12 @@ static int sched_job_exit_fun(int type, int situation, void* data, va_list ap)
|
|||
xce_jobfinish_t* info = va_arg(ap, xce_jobfinish_t*);
|
||||
int rc = 0;
|
||||
/* clang-format off */
|
||||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedExitJob,
|
||||
.data = {
|
||||
.sched_exit_job = info->jobid
|
||||
}
|
||||
};
|
||||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedExitJob,
|
||||
.data = {
|
||||
.sched_exit_job = info->jobid
|
||||
}
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
mylock_lock(&(c->sched.lock));
|
||||
|
|
@ -308,12 +308,12 @@ static int sched_job_fail_fun(int type, int situation, void* data, va_list ap)
|
|||
job_failinfo_t* info = va_arg(ap, job_failinfo_t*);
|
||||
int rc = 0;
|
||||
/* clang-format off */
|
||||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedFailJob,
|
||||
.data = {
|
||||
.sched_fail_job = info->jobid
|
||||
}
|
||||
};
|
||||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedFailJob,
|
||||
.data = {
|
||||
.sched_fail_job = info->jobid
|
||||
}
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
mylock_lock(&(c->sched.lock));
|
||||
|
|
@ -338,12 +338,12 @@ static int sched_job_update_fun(int type, int situation, void* data, va_list ap)
|
|||
job_t* job = va_arg(ap, job_t*);
|
||||
int rc = 0;
|
||||
/* clang-format off */
|
||||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedUpdateJob,
|
||||
.data = {
|
||||
.sched_update_job = &(job->job)
|
||||
}
|
||||
};
|
||||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedUpdateJob,
|
||||
.data = {
|
||||
.sched_update_job = job->job
|
||||
}
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
mylock_lock(&(c->sched.lock));
|
||||
|
|
@ -369,12 +369,12 @@ static int sched_job_rusage_update_fun(int type, int situation, void* data,
|
|||
xce_job_rusages_t* rusages = va_arg(ap, xce_job_rusages_t*);
|
||||
int rc = 0;
|
||||
/* clang-format off */
|
||||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedJobRusages,
|
||||
.data = {
|
||||
.sched_job_rusages = rusages
|
||||
}
|
||||
};
|
||||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedJobRusages,
|
||||
.data = {
|
||||
.sched_job_rusages = rusages
|
||||
}
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
mylock_lock(&(c->sched.lock));
|
||||
|
|
@ -419,11 +419,11 @@ static int sched_worker_change(int type, int situation, void* data,
|
|||
int rc = 0;
|
||||
xlist_t wlist;
|
||||
|
||||
TRACE("%s worker %s idx %d situation %d", __func__, w->host.name, w->idx,
|
||||
TRACE("%s worker %s idx %d situation %d", __func__, w->host->name, w->idx,
|
||||
situation);
|
||||
|
||||
collect_resval_with_idx(&(w->host.resvals), &(w->host.nresvals_to_sched),
|
||||
&(w->host.resvals_to_sched));
|
||||
collect_resval_with_idx(&(w->host->resvals), &(w->host->nresvals_to_sched),
|
||||
&(w->host->resvals_to_sched));
|
||||
|
||||
mylock_lock(&(c->sched.lock));
|
||||
if (c->sched.ep != NULL) {
|
||||
|
|
@ -440,8 +440,8 @@ static int sched_worker_change(int type, int situation, void* data,
|
|||
}
|
||||
mylock_unlock(&(c->sched.lock));
|
||||
|
||||
free_resval_with_idx_list(&(w->host.resvals_to_sched),
|
||||
w->host.nresvals_to_sched);
|
||||
free_resval_with_idx_list(&(w->host->resvals_to_sched),
|
||||
w->host->nresvals_to_sched);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -458,7 +458,14 @@ static int sched_worker_join(int type, int situation, void* data, va_list ap)
|
|||
return 0;
|
||||
}
|
||||
|
||||
w = workermgr_lock(&(c->workermgr), name, OBJREF_READ);
|
||||
rc = key_find(c->workermgr, (void *)name, (void **)&w);
|
||||
if (rc < 0) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (rc == 0) {
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
rc = sched_worker_change(type, situation, data, c, w);
|
||||
|
||||
|
|
@ -551,7 +558,7 @@ static int sched_queue_update(int type,
|
|||
xce_notify_data_t xdata = {
|
||||
.event = NotifyData_data_schedUpdateQueue,
|
||||
.data = {
|
||||
.sched_update_queue = &(q->queue)
|
||||
.sched_update_queue = q->queue
|
||||
}
|
||||
};
|
||||
/* clang-format on */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue