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: use optimized is_zero in object_stat_sum_t.is_zero() #7203

Merged
merged 2 commits into from Jan 18, 2016

Conversation

branch-predictor
Copy link
Contributor

We already have a fast implementation of is_zero(memory), we should use
it instead of using memcmp with temp struct on stack. This change reduces
object_stat_sum_t.is_zero() CPU usage by 35-50%.
Remove unused buf_is_zero() while we're at it.

Signed-off-by: Piotr Dałek piotr.dalek@ts.fujitsu.com

Piotr Dałek added 2 commits January 12, 2016 11:22
We already have a fast implementation of is_zero(memory), we should use
it instead of using memcmp with temp struct on stack. This change reduces
object_stat_sum_t.is_zero() CPU usage by 35-50%.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
Rmvoe unused function buf_is_zero, if someone misses it, a faster one is
available in include/inline_memory.h.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
@liewegas
Copy link
Member

lgtm

liewegas added a commit that referenced this pull request Jan 18, 2016
osd: use optimized is_zero in object_stat_sum_t.is_zero()

Reviewed-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit 7621a69 into ceph:master Jan 18, 2016
@ghost ghost changed the title osd/osd_types.h: use optimized is_zero in object_stat_sum_t.is_zero() osd: use optimized is_zero in object_stat_sum_t.is_zero() Feb 10, 2016
@ghost ghost added the core label Feb 15, 2016
@branch-predictor branch-predictor deleted the bp-use-faster-is-zero branch May 22, 2016 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants