-
Notifications
You must be signed in to change notification settings - Fork 926
Don't refcount the predefined datatypes. #2393
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
Don't refcount the predefined datatypes. #2393
Conversation
6fdb361
to
805eaec
Compare
ompi/datatype/ompi_datatype.h
Outdated
#define OMPI_DATATYPE_RELEASE(ddt) \ | ||
{ \ | ||
if( !ompi_datatype_is_predefined((ddt)) ) { \ | ||
OBJ_RELEASE((ddt)); \ |
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.
@bosilca you need to OPAL_OUTPUT_VERBOSE
__before``` OBJ_RELEASE
also, is this the right verbosity level here ?
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.
Thanks for catching this up. I increased the debug level to 100.
805eaec
to
6981757
Compare
#define OMPI_DATATYPE_RELEASE(ddt) \ | ||
{ \ | ||
if( !ompi_datatype_is_predefined((ddt)) ) { \ | ||
OPAL_OUTPUT_VERBOSE((0, 100, "Datatype %p [%s] refcount %d in file %s:%d\n", \ |
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.
@bosilca fwiw, you might or might not want to print
(ddt)->super.super.obj_reference_count - 1
instead
i do not really have a strong opinion on that though
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.
This message reports non-thread safe data, with the exception of developers nobody should ever use it. Let's keep it as is.
bot:retest |
Signed-off-by: George Bosilca <[email protected]>
6981757
to
c2cd717
Compare
Gilles indicated that he didn't have a strong opinion about the change he requested.
@ggouaillardet Can you re-review this PR? |
@ggouaillardet ping |
Skip the refcount update via an atomic operation for all predefined datatypes. This saves 2 atomics on the critical path for all communications, as long as the datatype is predefined.