Part II |
Arguably, simple tests are a bit too simplistic. We now create more challenging input for offence.
We start from the same set of tests produced by diy, from configuration files X.conf for x86 and PPC.conf for Power. We then build new tests by mixing two of the initial tests as follows: we first ramdomly permute the threads of one of the argument tests, convert its registers and memory locations to fresh ones and randomly interleave its code with the code of the other test, thread by thread. We do so with a dedicated tool, mixer, which is part of offence distribution. We then proceeds as for simple tests (see Part I), changing the condition of tests to check all SC outcomes, and running offence in various modes.
For x86 we mixed tests i and test i+1 of the batch of tests produced by diy, resulting in the initial batch of tests X that contains for instance X049+X050, which is a mix of simple tests X049 and X050. For this test the F version (with fences) is X049+X050-F, the A version (with xchg) is X049+X050-A, and the L version (with locks) is X049+X050-L.
We run all tests on our two x86 machines saumur and chianti The following tables expose the conclusion of the experiment: offence restores SC for all (mixed) tests.
For power, we mixed one test of the the batch of tests produced by diy with itself, resulting in the initial batch of tests X that contains for instance the test PPC149, a self-mix of the homonymous simple test PPC149. For this test the F version (with fences) is PPC149-F, the A version (with STA/FNO) is PPC149-A, the B version (with FNO’s and fences) is PPC149-B, and the L version (with locks) is PPC149-L.
Incidentally, the effect of the optimised fence placement algorithm is visible on most tests. For instance on PPC008-F, in which code there are 1 lwsync and 3 sync, against 7 sync for the test PPC008-N produced by using naive fence insertion (offence -fencing naive).
We run the tests on our Power machines, abducens, vargas, power7. As for simple tests, the table are huge and located in a separate page. The experience succeeds: the cells of the last four tables all contain “Ok”.
Complete sources and logs: for x86 X86-MIXED (archive) and Power PPC-MIXED (archive).