Commit dcf8468
device/gpu: address review feedback on proactive eviction
Three issues raised in code review:
1. MCA parameter scope
mem_evict_upper and mem_evict_lower were registered once per GPU
backend component, which means the second registration overwrites the
first when both CUDA and Level Zero are enabled, and the params end up
under backend-specific namespaces. Move the registrations to
parsec_mca_device_init() in device.c under the "device" namespace
(device_mem_evict_upper / device_mem_evict_lower), guarded by
PARSEC_HAVE_CUDA || PARSEC_HAVE_HIP || PARSEC_HAVE_LEVEL_ZERO so the
extern references are only present when transfer_gpu.c is compiled.
2. data_avail_epoch style
Tier-1 used `data_avail_epoch = 1` while the rest of the function uses
`data_avail_epoch++`. Changed to `++` for consistency.
3. Threshold step-down condition
The previous placement fired on every PARSEC_HOOK_RETURN_NEXT from
parsec_device_progress_stream, which tries one task per call — not all
tasks. This could drive mem_evict_threshold to its minimum rapidly.
The step-down is now integrated into the mem_evict_in_flight == 0
guard: we only lower the threshold when there are no active evictions
AND parsec_gpu_create_w2r_task also returns NULL (no dirty pages
available to queue). That is the true "stuck" condition.
Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c9f7ba7 commit dcf8468
4 files changed
Lines changed: 27 additions & 21 deletions
File tree
- parsec/mca/device
- cuda
- level_zero
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | 164 | | |
171 | 165 | | |
172 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
304 | 310 | | |
305 | 311 | | |
306 | 312 | | |
| |||
313 | 319 | | |
314 | 320 | | |
315 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
316 | 334 | | |
317 | 335 | | |
318 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
960 | | - | |
| 960 | + | |
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
| |||
2758 | 2758 | | |
2759 | 2759 | | |
2760 | 2760 | | |
2761 | | - | |
2762 | | - | |
2763 | | - | |
2764 | | - | |
2765 | | - | |
2766 | | - | |
2767 | | - | |
2768 | 2761 | | |
2769 | 2762 | | |
2770 | | - | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
2771 | 2767 | | |
2772 | 2768 | | |
2773 | 2769 | | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
2774 | 2774 | | |
2775 | 2775 | | |
2776 | 2776 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | 274 | | |
281 | 275 | | |
282 | 276 | | |
| |||
0 commit comments