|
From: Philippe W. <phi...@sk...> - 2011-11-08 21:07:50
|
> Without proper fencing, we don't have any assurance that such
> test programs will finish in finite time even when running natively.
> At least if they are properly fenced, then any failure to terminate
> must be caused only by Valgrind's games with thread scheduling.
Florian tried a fence on s390x, and I tried a fence on amd64.
None of these solved the problem reliably.
>
> Then, if that doesn't help, we might also need to use the fair-scheduling
> stuff that Bart has been working on.
I just tried Bart's fair scheduler on ppc64 with a recent svn version.
With the fair scheduler: annotate_hbefore consistently takes around 1.4 seconds
with helgrind, and 4.8 seconds with drd.
With the pipe lock, I have seen variations up to 15+ minutes
(helgrind or drd) + seen at least once more than one hour of cpu (killed).
So, it looks like at least for this test, the safest (or mandatory?) changes would be:
* have a clean solution for the delay500ms (because on small overloaded computers,
delay500ms might not be enough)
* have fence instructions
* have fair scheduling (otherwise, on big computers with enough idle CPUs, the
unfairness might cause a non termination as only one thread ever runs).
Philippe
|