Skip to content

Commit

Permalink
orch manage pickPidInfoS fix CPU-change recomputeTimes only==-1 err full
Browse files Browse the repository at this point in the history
  • Loading branch information
flhofer committed Jun 27, 2024
1 parent 6b2de62 commit 1dda796
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/orchestrator/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,9 @@ pickPidInfoS(const void * addr, const struct ftrace_thread * fthread, uint64_t t
item->mon.assigned = fthread->cpuno;

// Removed from, should give no issues
if (0 > recomputeCPUTimes(CPU))
if (-1 == recomputeCPUTimes(CPU)) // if -2 = CPU not found, i.e. affinity preference, no real affinity set yet, do nothing
if (SM_DYNSIMPLE <= prgset->sched_mode)
pickPidReallocCPU(CPU, 0);
(void)pickPidReallocCPU(CPU, 0);

if (0 <= CPU)
item->mon.resched++;
Expand All @@ -945,7 +945,7 @@ pickPidInfoS(const void * addr, const struct ftrace_thread * fthread, uint64_t t
// recompute actual CPU, new tasks might be there now
if (0 > recomputeCPUTimes(fthread->cpuno))
if (SM_DYNSIMPLE <= prgset->sched_mode)
pickPidReallocCPU(fthread->cpuno, 0);
(void)pickPidReallocCPU(fthread->cpuno, 0);

// find PID switching from
for (node_t * item = nhead; ((item)); item=item->next )
Expand Down

0 comments on commit 1dda796

Please sign in to comment.