-
Notifications
You must be signed in to change notification settings - Fork 900
Set the refcnt to zero for new memory zones. #13089
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
Conversation
Thanks @ymeur for the report and the proposed fix. Fixes open-mpi#12892. Signed-off-by: George Bosilca <[email protected]>
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.
I'm ok with this patch but maybe we should attribute the author of #12892 in the commit? (sorry, can't tag the name here)
It is. What exactly do you mean ? |
I meant a |
@bosilca @devreal @janjust |
@MamziB the original issue reference both the need for this fix and the rationale. This looks correct to me, we need to set the refcount to zero when we create a new memory zone, and this is exactly what we do here (we make room into the existing allocations array, and as a result this allocation will inherit the refcount of the previous one). |
@bosilca Yes, I am aware of that issue. We have a maximum of OMPI_OSC_UCX_ATTACH_MAX dynamic windows that can be created, and the local_dynamic_win_info array of this size keeps track of any window that is allocated. During initialization, component_select ensures that all reference counts are set to zero. As a result, we no longer need to manually reset them. When a new window is created, we can be certain that the assigned slot among the OMPI_OSC_UCX_ATTACH_MAX slots is available—either because it was previously detached or has never been used. In both cases, the reference count must already be zero. |
That's a different story. The two memmove are creating room in the |
@bosilca Thanks for the explanation, I see your point now and this PR is indeed needed. |
Thanks @ymeur for the report and the proposed fix.
Fixes #12892.