K 10 svn:author V 3 avg K 8 svn:date V 27 2011-05-15T10:01:38.463776Z K 7 svn:log V 1997 smp_rendezvous: correctly support concurrent complex rendezvous This is a big change. A problem with the previous approach can be demonstrated by this example: - processors Ps1 and Ps2 issue complex rendezvous requests R1 and R2 to processors Pt1 and Pt2 - because of request timings Pt1 gets R1 before R2 while Pt2 gets R2 before R1 - Pt1 executes setup action of R1 and waits for Pt2 to do the same - Pt2 executes setup action of R2 and waits for Pt1 to do the same - deadlock New approach is that we should check for incoming events while waiting in between of actions of a complex rendezvous event. In the example above this means that Pt1 after execution of action of R1 would then notice R2 and execute its setup action. Thus we allow actions of different requests to be interleaved. The only important limitation is that target CPUs should not leave rendezvous handling context until all of rendezvous' actions are executed. To implement this approach all rendezvous sequence points are coordinated via a rendezvous' master CPU. Slave CPUs just execute one action and go back to main event processing loop. The master CPU waits for all targeted slave CPUs to executed the current action (and while waiting it also checks for incoming events). When all the slave CPUs finish executing current action, then the master CPU signals them to execute the next action. Some implementation details: - master CPU increases work count for slave CPUs by total count of non-no-barrier actions in a rendezvous, so that the slave CPUs do not leave rendezvous handling context until all actions are done - master CPU processes incoming request in between posting its actions - master CPU bumps its work count before posting action, so that other CPUs know that the master CPU can process incoming events without being IPI-ed - master CPU processes all incoming events before leaving smp_rendezvous so that it fully completes incoming complex rendezvous without leaving the context END