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

Avoid holding a lock during agas::incref while doing a credit split #1371

Merged
merged 2 commits into from Feb 5, 2015

Conversation

Projects
None yet
2 participants
@sithhell
Copy link
Member

commented Feb 3, 2015

No description provided.

@hkaiser hkaiser added this to the 0.9.10 milestone Feb 3, 2015

@hkaiser

This comment has been minimized.

Copy link
Member

commented Feb 3, 2015

Do all tests pass for this?

@sithhell

This comment has been minimized.

Copy link
Member Author

commented Feb 4, 2015

Yes, all tests pass.

@hkaiser

This comment has been minimized.

Copy link
Member

commented on src/runtime/naming/name.cpp in 0a34006 Feb 4, 2015

This code triggers credit splitting if the remaining credit is 2 (2 ^ 1). Was that intended?

This comment has been minimized.

Copy link
Member Author

replied Feb 4, 2015

It's the same logic as before:

  1. we get the current credit from the gid
  2. If the credit is one after being split ( == 2 before the split), we request more credit.
@hkaiser

This comment has been minimized.

Copy link
Member

commented on src/runtime/naming/name.cpp in 0a34006 Feb 4, 2015

Please use (std::min)(HPX_GLOBALCREDIT_INITIAL, new_credit) here.

@hkaiser

This comment has been minimized.

Copy link
Member

commented Feb 4, 2015

I'm still not convinced that competing incref requests do not lead to out of order decref requests, especially when several localities are involved. I'm hesitant to agree to merging this.

@sithhell

This comment has been minimized.

Copy link
Member Author

commented Feb 4, 2015

I am. I successfully ran hello_world on several numbers of localities: 2, 4, 8, 16, 32, 64, 128, 256 and 512. Hello world ran successfully ten times on each number of localities. Note that hello_world requires credit splitting with 16 localities and up. I didn't have a single failure. How do you think out of order decrefs might happen?

@hkaiser

This comment has been minimized.

Copy link
Member

commented Feb 4, 2015

Ok, I'm not able to think of anything bad at this point. Let's go ahead and merge this. I'll keep an eye open, though.

sithhell added a commit that referenced this pull request Feb 5, 2015

Merge pull request #1371 from STEllAR-GROUP/more_held_locks
Avoid holding a lock during agas::incref while doing a credit split

@sithhell sithhell merged commit 9e87d17 into master Feb 5, 2015

@sithhell sithhell deleted the more_held_locks branch Feb 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.