@@ -52,8 +52,9 @@ index 8269aa0949..bf022bc243 100644
52
52
53
53
```
54
54
55
- * Backport a performance fix from the development version of qthreads.
55
+ * Backport a few performance fixes from the development version of qthreads.
56
56
https://github.com/chapel-lang/chapel/pull/26138
57
+ https://github.com/chapel-lang/chapel/pull/26328
57
58
58
59
```
59
60
diff --git a/include/qt_atomics.h b/include/qt_atomics.h
@@ -87,3 +88,30 @@ index 2ac887ed..2312c954 100644
87
88
#define QTHREAD_FASTLOCK_SETUP() \
88
89
do { \
89
90
```
91
+
92
+ ```
93
+ --- a/src/io.c
94
+ +++ b/src/io.c
95
+ @@ -74,7 +74,6 @@ static void qt_blocking_subsystem_internal_freemem(void) { /*{{{*/
96
+ static void *qt_blocking_subsystem_proxy_thread(void *Q_UNUSED(arg)) { /*{{{*/
97
+ while (!atomic_load_explicit(&proxy_exit, memory_order_relaxed)) {
98
+ if (qt_process_blocking_call()) { break; }
99
+ - MACHINE_FENCE;
100
+ }
101
+ atomic_fetch_sub_explicit(&io_worker_count, 1, memory_order_relaxed);
102
+ pthread_exit(NULL);
103
+ ```
104
+
105
+ ```
106
+ --- a/include/qthread/qthread.h
107
+ +++ b/include/qthread/qthread.h
108
+ @@ -87,7 +87,7 @@ using std::memory_order_relaxed;
109
+
110
+ #include "macros.h"
111
+
112
+ -#define MACHINE_FENCE atomic_thread_fence(memory_order_acq_rel);
113
+ +#define MACHINE_FENCE atomic_thread_fence(memory_order_seq_cst);
114
+
115
+ #if QTHREAD_ASSEMBLY_ARCH == QTHREAD_AMD64
116
+ #define QTHREAD_SWAPS_IMPLY_ACQ_REL_FENCES
117
+ ```
0 commit comments