Commit 496cecd
[Store|TransferEngine]: use condition-variable based completion instead of busy-polling (#1053)
* (Event-driven completion) Provide an option to use condition-variable based completion instead of busy-polling
Summary
- Add USE_EVENT_DRIVEN_COMPLETION compile-time option in common.cmake (default OFF).
- Store: TransferEngineOperationState waits on BatchDesc::completion_cv with timeout; falls back to original polling when the flag is OFF.
- TransferEngine: add per-batch finished_task_count, has_failure, is_finished and completion_cv on BatchDesc; notify on last task completion; unify __atomic_* usage.
- No behavior change when USE_EVENT_DRIVEN_COMPLETION is OFF (default).
---------
Co-authored-by: wangwenqi <[email protected]>1 parent 5f016f4 commit 496cecd
File tree
3 files changed
+157
-7
lines changed- mooncake-common
- mooncake-store/src
- mooncake-transfer-engine/include/transport
3 files changed
+157
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
86 | 93 | | |
87 | 94 | | |
88 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
289 | | - | |
290 | | - | |
291 | 290 | | |
292 | 291 | | |
293 | 292 | | |
294 | 293 | | |
295 | 294 | | |
296 | 295 | | |
297 | 296 | | |
298 | | - | |
299 | 297 | | |
300 | | - | |
301 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
302 | 348 | | |
303 | 349 | | |
304 | 350 | | |
| |||
322 | 368 | | |
323 | 369 | | |
324 | 370 | | |
| 371 | + | |
325 | 372 | | |
326 | 373 | | |
327 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| 83 | + | |
79 | 84 | | |
80 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
81 | 101 | | |
82 | 102 | | |
83 | 103 | | |
| |||
128 | 148 | | |
129 | 149 | | |
130 | 150 | | |
131 | | - | |
132 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
133 | 156 | | |
134 | 157 | | |
135 | 158 | | |
136 | 159 | | |
137 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
138 | 163 | | |
139 | 164 | | |
140 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
141 | 221 | | |
142 | 222 | | |
143 | 223 | | |
| |||
198 | 278 | | |
199 | 279 | | |
200 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
201 | 285 | | |
202 | 286 | | |
203 | 287 | | |
| |||
220 | 304 | | |
221 | 305 | | |
222 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
223 | 319 | | |
224 | 320 | | |
225 | 321 | | |
| |||
0 commit comments