]> git.lizzy.rs Git - plan9front.git/commit
kernel: fix livelock in rebalance (thanks Richard Miller)
authorcinap_lenrek <cinap_lenrek@felloff.net>
Mon, 17 Sep 2018 22:53:05 +0000 (00:53 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Mon, 17 Sep 2018 22:53:05 +0000 (00:53 +0200)
commitbd49212b467c60d6d5e4e2eefc13ec88012ec785
treef7df1378eb1aefa3177ef590d8e5cbb8367143dc
parente619a03c28a1bc979faeaa2853c58f94b5c3c5ad
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.
sys/src/9/port/proc.c