-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UCS/RCACHE: Add support for dynamic region alignment #9441
Conversation
878e7fd
to
8b93a57
Compare
src/ucs/memory/rcache.c
Outdated
ucs_list_head_init(®ion_list); | ||
ucs_rcache_find_regions(rcache, *start, old_start, ®ion_list); | ||
ucs_rcache_find_regions(rcache, *start, old_start - 1, ®ion_list); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why changed to -1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ucs_rcache_find_regions() expects an inclusive end, see other uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we write the code as while loop that stops when the list of overlapping regions is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we always can replace goto with do {...} while(!list_empty)
do we want to avoid traversing regions we already cleaned as we do here?
src/ucs/memory/rcache.c
Outdated
ucs_list_head_init(®ion_list); | ||
ucs_rcache_find_regions(rcache, *start, old_start, ®ion_list); | ||
ucs_rcache_find_regions(rcache, *start, old_start - 1, ®ion_list); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we write the code as while loop that stops when the list of overlapping regions is empty?
91f02d2
to
56edd94
Compare
@@ -402,7 +402,7 @@ UCS_MT_TEST_F(test_rcache, merge, 6) { | |||
munmap(mem, size1 + pad + size2); | |||
} | |||
|
|||
UCS_MT_TEST_F(test_rcache, merge_aligned, 6) | |||
UCS_TEST_F(test_rcache, merge_aligned) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why changed?
40f7d42
to
85d2d9d
Compare
Why ?
Some transports (e.g. gdrcopy) require special alignment.
How ?
Regions in the UCP rcache will select the maximum alignment from the MD registrations they comprise. When merging regions, the rcache will also choose the maximum alignment.