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: minor performance improvements and fixes #10526

Merged
merged 7 commits into from Aug 8, 2016

Conversation

xiexingguo
Copy link
Member

No description provided.

Which is never used by anyone.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@xiexingguo xiexingguo force-pushed the xxg-wip-misc-2016-07-30 branch 2 times, most recently from 84fe526 to 60ff0ec Compare August 1, 2016 12:10
@xiexingguo
Copy link
Member Author

@athanatos Please take a look. Thanks!

@@ -949,13 +949,13 @@ class OSDService {
Mutex::Locker l(recovery_lock);
_maybe_queue_recovery();
}
void clear_queued_recovery(PG *pg, bool front = false) {
void clear_queued_recovery(PG *pg) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, this one may come to life again soon, please remove this commit.

For now BlueStore is the only caller of set_bitwise_key_u32(),
and it will always passed in hash_reverse_bits.

Since this is one of the basic and key method of BlueStore, it makes
sense to make it a little faster.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
1. these counters are of type atomic_t and are public-access safe.

2. since the tick() thread requires the big osd_lock and thus may
   not tick at a constant interval, it is good for accuracy and
   performance to move the buffer-related stats to the
   tick_without_osd_lock() thread instead.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
By moving the buffer-related stats into tick_without_osd_lock(),
we are already accurate enough updating period of these counters.
So there is no need to do this in this time-senstive method,
which holds the big osd_lock.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Because we are going to return anyway under this case.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
We may use osd_mon_ack_timeout the following way:
  double backoff = stats_ack_timeout / g_conf->osd_mon_ack_timeout;
which is at risk of precision lost.

Example:

main()
{
  double r = 5 / 30;
  cout << "r = " << r << std::endl;
}

Output:
  r = 0

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@xiexingguo
Copy link
Member Author

@athanatos Done and thanks for the confirmation.

@athanatos
Copy link
Contributor

@xiexingguo I haven't reviewed those 4 new ones. I'd appreciate it if you did not add more commits to a PR after I've reviewed the PR and added the needs-qa label... Please remove them and ping me so that I can re-add the needs-qa label.

@xiexingguo
Copy link
Member Author

I'd appreciate it if you did not add more commits to a PR after I've reviewed the PR and added the needs-qa label...

@athanatos Sure.
Moved those changes into #10548, and please take a look at them too. Thanks!

@yuriw yuriw merged commit aa5ef1d into ceph:master Aug 8, 2016
@xiexingguo xiexingguo deleted the xxg-wip-misc-2016-07-30 branch August 9, 2016 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants