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

crush: remove the crush_lock #11830

Merged
merged 3 commits into from Nov 11, 2016
Merged

Conversation

adamemerson
Copy link
Contributor

Do not keep mutable state around in the CRUSH map, move it out into a separate workspace that gets passed in. Making the CRUSH map read-only allows concurrency.

@liewegas liewegas changed the title Remove the crush_lock crush: remove the crush_lock Nov 8, 2016
@liewegas liewegas added this to the kraken milestone Nov 8, 2016
@liewegas
Copy link
Member

liewegas commented Nov 8, 2016

retest this please

@adamemerson
Copy link
Contributor Author

I rebuilt and re-ran make check. Everything passed except for osd-scrub-repair.sh and osd-scrub-snaps.sh which were also failing on master last time I checked, so I don't think they're triggered by anything here.

Then add it to the working state. It would be very nice if we didn't
have to take a lock to calculate a crush placement. By moving the
permutation array into the working data, we can treat the CRUSH map as
immutable.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Much like Arlo Guthrie, I decided that one big pile is better than two
little piles.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Now that we no longer use the map as a scratch pad, we don't need to
lock during rule execution.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Copy link
Member

@liewegas liewegas left a comment

Choose a reason for hiding this comment

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

LGTM!

@liewegas liewegas merged commit a1303ce into ceph:master Nov 11, 2016
@adamemerson adamemerson deleted the wip-crush-unlocked branch January 13, 2017 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants