Repository navigation
nixlbench: fix object storage device ID collisions across threads - #1638
Conversation
The device ID passed to initBasicDescObj was the inner loop index, causing all threads to generate the same set of device IDs. This could route all threads through the same backend connection, defeating multi-threaded parallelism. Compute a globally unique ID as list_idx * num_devices + inner_idx in both allocateMemory (local side) and exchangeIOV (remote side) so descriptors stay in sync. Also fix devidx not being incremented in the OBJ branch of exchangeIOV, which caused all remote descriptors to use device ID 0. Signed-off-by: Olivier Garaud <olivier.garaud@scality.com>
|
👋 Hi oliviergaraud! Thank you for contributing to ai-dynamo/nixl. Your PR reviewers will review your contribution then trigger the CI to test your changes. 🚀 |
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughThis PR updates OBJ-storage paths to compute composite device IDs as ChangesOBJ Device ID Mapping Refactor
🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers:
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Replace range-based iterator loops that manually tracked list_idx and devidx counters with index-based loops for clarity. Signed-off-by: Olivier Garaud <olivier.garaud@scality.com>
|
/ok to test 1a2d02f |
|
/build |
|
Thanks @aranadive |
|
/ok to test 1a2d02f |
Yeah those are not visible outside of our org. For now they are unrelated to the PR. We will triage and let you know if its a PR issue. |
|
/build |
|
@oliviergaraud please rebase to pick up some CI fixes |
done. |
|
/ok to test dd79daf |
|
/build |
1 similar comment
|
/build |
What?
Compute globally unique device IDs for object storage descriptors in both
allocateMemoryandexchangeIOV.Why?
The device ID passed to
initBasicDescObjwas the inner loop index (ioriov.devId), so every thread generated the same set of IDs (e.g.{0, 1, 2}).This could route all threads through the same backend connection, defeating multi-threaded parallelism.
Additionally,
devidxwas never incremented in the OBJ branch ofexchangeIOV, so all remote descriptors used device ID 0.How?
In both
allocateMemory(local side) andexchangeIOV(remote side), compute the device ID aslist_idx * num_devices + inner_idx, producing unique IDs across all threads (e.g. thread 0 gets{0,1,2}, thread 1 gets{3,4,5}).Also add the missing
devidx++inexchangeIOVso the remote descriptors stay in sync with local ones.Summary by CodeRabbit