kernel: fix livelock in rebalance (thanks Richard Miller)
Once a second rebalance() is called on cpu0 to adjust priorities, so cpu-bound processes won't lock others out. However it was only adjusting processes which were running on cpu0. This was observed to lead to livelock, eg when a higher-priority process spin-waits for a lock held by a lower priority one.
This commit is contained in:
parent
e619a03c28
commit
bd49212b46
1 changed files with 0 additions and 2 deletions
|
@ -478,8 +478,6 @@ another:
|
|||
p = rq->head;
|
||||
if(p == nil)
|
||||
continue;
|
||||
if(p->mp != MACHP(m->machno))
|
||||
continue;
|
||||
if(pri == p->basepri)
|
||||
continue;
|
||||
updatecpu(p);
|
||||
|
|
Loading…
Reference in a new issue