Plan 9 from Bell Labs’s /usr/web/sources/contrib/yk/dist/9legacy/applied/9-proc-pexit.diff

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


1. 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.

Reference: /n/sources/patch/proc-smp-fixes
Date: Tue Apr 19 13:42:06 CES 2016
Signed-off-by: miller@hamnavoe.com

--- /sys/src/9/port/proc.c	Tue Apr 19 13:28:33 2016
+++ /sys/src/9/port/proc.c	Tue Apr 19 13:42:26 2016
@@ -471,8 +471,6 @@
 		p = rq->head;
 		if(p == nil)
 			continue;
-		if(p->mp != MACHP(m->machno))
-			continue;
 		if(pri == p->basepri)
 			continue;
 		updatecpu(p);

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.