Skip to content

Commit

Permalink
mxqd: set cpu_set_running in group_add_job
Browse files Browse the repository at this point in the history
so it is applied to reloaded jobs as well
  • Loading branch information
donald committed Oct 30, 2015
1 parent 35af203 commit 78bec97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ static void cpuset_init_job(cpu_set_t *job_cpu_set,cpu_set_t *available,cpu_set_
for (cpu=CPU_SETSIZE-1;slots&&cpu>=0;cpu--) {
if (CPU_ISSET(cpu,available) && !CPU_ISSET(cpu,running)) {
CPU_SET(cpu,job_cpu_set);
CPU_SET(cpu,running);
slots--;
}
}
Expand Down Expand Up @@ -828,6 +827,8 @@ struct mxq_job_list *group_add_job(struct mxq_group_list *group, struct mxq_job
user->threads_running += mxqgrp->job_threads;
server->threads_running += mxqgrp->job_threads;

CPU_OR(&server->cpu_set_running,&server->cpu_set_running,&j->job.host_cpu_set);

mxqgrp->group_jobs_running++;
mxqgrp->group_jobs_inq--;

Expand Down

0 comments on commit 78bec97

Please sign in to comment.