2. When mmu mapping for a shared segment is changed, procflushseg is called to wait for other cpus to change their mapping. The loop contains a sched() call which could return on a different cpu, and therefore cause some cpus in the list to be skipped 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 @@ -1299,7 +1297,7 @@ /* * wait till all processes have flushed their mmu - * state about segement s + * state about segment s */ void procflushseg(Segment *s) @@ -1336,10 +1334,13 @@ * wait for all processors to take a clock interrupt * and flush their mmu's */ - for(nm = 0; nm < conf.nmach; nm++) - if(MACHP(nm) != m) - while(MACHP(nm)->flushmmu) - sched(); +again: + for(nm = 0; nm < conf.nmach; nm++){ + if(nm != m->machno && MACHP(nm)->flushmmu){ + sched(); + goto again; + } + } } void