Skip to content
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

Optimized put with signal implementation as shmemx routines #815

Merged
merged 11 commits into from
Jan 7, 2019

Conversation

wrrobin
Copy link
Collaborator

@wrrobin wrrobin commented Dec 11, 2018

No description provided.

@wrrobin wrrobin requested review from jdinan and davidozog December 11, 2018 17:51
src/transport_ofi.h Outdated Show resolved Hide resolved
src/shmem_comm.h Outdated Show resolved Hide resolved
src/shmem_comm.h Outdated Show resolved Hide resolved
src/transport_ofi.h Outdated Show resolved Hide resolved
@wrrobin
Copy link
Collaborator Author

wrrobin commented Jan 4, 2019

@jdinan @davidozog Ready for re-review.

Copy link
Member

@jdinan jdinan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. Noted a few comments/issues to add just to track things we may need to revisit/remember. Go ahead and merge after comments/issues are added. Thanks!

shmem_transport_fence(ctx);
shmem_transport_put_scalar(ctx, sig_addr, &signal, sizeof(uint64_t), pe);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a "FIXME" comment and/or file an issue to go back and optimize nonblocking put-with-signal in the Portals transport?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

if (len == 0) {
shmem_internal_put_scalar(ctx, sig_addr, &signal, sizeof(uint64_t), pe);
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. Just wanted to suggest double checking the proposal that this is the right way to handle the len == 0 case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no specific text added in the proposal for this case. However, in the discussion, it is mentioned that sending the signal is the expected behavior.

};

do {
ret = fi_writemsg(ctx->ep, &msg, FI_DELIVERY_COMPLETE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean to add the FI_INJECT flag here (this is the buffered send case)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, FI_INJECT should be added here. Thanks.


frag_source += frag_len;
frag_target += frag_len;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just making an observation that when fragmentation occurs, the signal will be signaling completion of multiple prior puts. I re-read the FI_FENCE text and I think this is ok. It might not hurt to toss a comment somewhere to the effect that multiple prior operations may be fenced by the signal put when fragmentation occurs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

};

do {
ret = fi_atomicmsg(ctx->ep, &msg_signal, FI_DELIVERY_COMPLETE | FI_FENCE | FI_INJECT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The open question is, whether we also need to use an atomic to implement shmem_p. Could you add a comment here and open an issue so we remember to revisit this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants