Paul Bone
ecaecf2981
Prevent two different race conditions in the wsdeque implementation.
...
Chase & Lev's algorithm for circular work stealing deques does not
specify a memory model, and appears to assume a strict memory model such
as Java provides, this I have inferred because the examples in their
paper use Java syntax.
When we translated their algorithms into C we introduced two bugs by
assuming that we could write the code in C as it appeared in the Java
examples. C has no specific memory model and allows your processor to
re-order many memory operations. This patch corrects both bugs by
introducing one memory fence operation per bug and explains the bugs and
fixes in comments.
Unfortunately this causes the fibs micro benchmark (without granularity
control) to slow down by almost one third. Which is disappointing bot
unavoidable.
runtime/mercury_wsdeque.h:
As above.
2012-09-19 13:41:43 +00:00
..
2012-09-04 11:42:53 +00:00
2011-10-17 04:31:33 +00:00
2011-10-17 04:31:33 +00:00
2011-05-20 04:16:58 +00:00
2012-06-20 13:13:34 +00:00
2012-06-20 13:13:34 +00:00
2011-04-13 13:19:42 +00:00
2011-05-20 04:16:58 +00:00
2011-08-01 07:06:21 +00:00
2011-09-12 16:29:55 +00:00
2010-09-15 04:36:23 +00:00
2011-12-07 11:29:16 +00:00
2012-07-29 10:13:17 +00:00
2012-09-04 11:08:38 +00:00
2012-08-06 02:11:24 +00:00
2010-05-26 07:45:49 +00:00
2010-05-26 07:45:49 +00:00
2011-09-06 05:20:45 +00:00
2011-09-06 05:20:45 +00:00
2011-09-06 05:20:45 +00:00
2012-02-13 00:11:57 +00:00
2012-02-13 00:11:57 +00:00
2011-12-14 03:26:01 +00:00
2010-09-21 01:09:17 +00:00
2011-05-20 04:16:58 +00:00
2011-07-05 03:34:39 +00:00
2012-08-06 02:11:24 +00:00
2011-10-17 04:31:33 +00:00
2010-02-13 07:29:10 +00:00
2010-07-16 07:19:12 +00:00
2011-12-08 23:24:14 +00:00
2011-08-09 11:07:37 +00:00
2011-08-01 07:06:21 +00:00
2011-09-26 04:30:48 +00:00
2011-05-20 04:16:58 +00:00
2011-07-13 01:22:54 +00:00
2011-05-21 13:59:07 +00:00
2011-08-01 07:06:21 +00:00
2010-02-13 07:29:10 +00:00
2010-02-13 07:29:10 +00:00
2012-02-13 00:11:57 +00:00
2012-02-13 00:11:57 +00:00
2010-02-13 07:29:10 +00:00
2011-05-20 04:16:58 +00:00
2012-02-13 00:11:57 +00:00
2011-10-17 04:31:33 +00:00
2011-12-07 11:29:16 +00:00
2011-10-26 14:08:45 +00:00
2012-07-29 11:35:43 +00:00
2011-11-23 10:53:01 +00:00
2011-11-12 13:08:49 +00:00
2011-05-20 04:16:58 +00:00
2011-10-24 03:52:59 +00:00
2011-09-12 16:29:55 +00:00
2011-09-06 05:20:45 +00:00
2012-02-13 00:11:57 +00:00
2011-11-12 12:56:02 +00:00
2011-10-19 11:57:54 +00:00
2012-08-06 02:11:24 +00:00
2011-05-20 04:16:58 +00:00
2011-11-05 15:58:16 +00:00
2011-11-05 15:58:16 +00:00
2011-05-20 04:16:58 +00:00
2011-11-14 06:02:37 +00:00
2011-11-12 12:29:21 +00:00
2011-10-17 04:31:33 +00:00
2010-05-23 04:54:22 +00:00
2010-05-23 04:54:22 +00:00
2011-09-26 04:29:37 +00:00
2012-06-05 18:19:33 +00:00
2012-06-05 18:19:33 +00:00
2012-06-05 18:19:33 +00:00
2011-05-20 04:16:58 +00:00
2012-01-04 13:56:12 +00:00
2011-05-20 04:16:58 +00:00
2011-05-20 04:16:58 +00:00
2012-03-26 06:57:34 +00:00
2012-03-26 06:57:34 +00:00
2011-09-06 05:20:45 +00:00
2011-09-06 05:20:45 +00:00
2011-05-20 04:16:58 +00:00
2011-05-20 04:16:58 +00:00
2011-06-16 06:42:19 +00:00
2012-06-19 11:08:16 +00:00
2011-10-13 02:42:21 +00:00
2012-06-20 13:13:34 +00:00
2012-06-20 13:13:34 +00:00
2011-10-26 14:08:45 +00:00
2011-09-21 09:31:53 +00:00
2011-09-26 04:30:48 +00:00
2011-05-20 04:16:58 +00:00
2011-05-20 04:16:58 +00:00
2012-02-13 00:11:57 +00:00
2012-02-13 00:11:57 +00:00
2012-01-09 03:31:08 +00:00
2011-08-02 08:28:19 +00:00
2011-06-16 06:42:19 +00:00
2011-10-27 14:14:10 +00:00
2012-06-22 09:24:09 +00:00
2011-12-14 03:26:01 +00:00
2011-05-20 04:16:58 +00:00
2012-09-19 13:41:43 +00:00
2011-08-22 07:56:10 +00:00
2011-09-19 08:46:23 +00:00
2012-07-29 10:13:17 +00:00
2011-10-27 14:14:10 +00:00