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

osd: utime_t, eversion_t, osd_stat_sum_t encoding optimization #6902

Merged
merged 3 commits into from Dec 18, 2015

Conversation

XinzeChi
Copy link
Contributor

Signed-off-by: Xinze Chi xinze@xsky.com

@XinzeChi
Copy link
Contributor Author

@liewegas , please review again. Thanks.

@XinzeChi XinzeChi force-pushed the wip-pg_stat_t-encoding branch 3 times, most recently from dd8fa7c to e4de246 Compare December 14, 2015 03:14
@liewegas
Copy link
Member

Please update the object_stat_sum_t encoding in a single commit (that one is trivial).

pg_stat_t is harder because I'm pretty sure

pg_t parent;
__u32 parent_split_bits;

won't stay aligned. But I suspect we'll get most of the win here just with object_stat_sum_t, even if we don't touch pg_stat_t...

@XinzeChi
Copy link
Contributor Author

@liewegas , what about reorder the pg_stat_t, so we use two steps to encode the struct. Using two step would be more easier for adding new members.

  1. one step for the simple type member, such is utime_t, uint32_t, uint64_t (we could reorder these types and ensure that there are not padding among them ). So we could fast_encoding these members.
  2. The other step is for complex struct, such as pg_t parent, eversion_t and vector. we encode these member one by one.

The new strategy is XinzeChi@b53f087.

@liewegas
Copy link
Member

@XinzeChi I think teh pg_stat strategy makes sense, but we should do it separately as a follow-on, and overlap it with a feature bit we spend on something else (feature bits are getting scarce). Let's leave it off this PR and get the other 3 types done first as they are simple.

there is no padding between tv_sec and tv_nsec, no matter 32-bit
or 64-bit machine.

Signed-off-by: Xinze Chi <xinze@xsky.com>
There is no padding between version and epoch, no matter 32-bit
or 64-bit machine.

Signed-off-by: Xinze Chi <xinze@xsky.com>
Signed-off-by: Xinze Chi <xinze@xsky.com>
@XinzeChi
Copy link
Contributor Author

@liewegas , I See. Thanks for your quick reply. Please review again. Thanks.

@liewegas
Copy link
Member

lgtm!

liewegas added a commit that referenced this pull request Dec 18, 2015
osd: utime_t, eversion_t, osd_stat_sum_t encoding optimization

Reviewed-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit 2dbb19d into ceph:master Dec 18, 2015
@ghost ghost changed the title osd: pg_stat_t encoding optimization osd: utime_t, eversion_t, osd_stat_sum_t encoding optimization Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants