-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
Which is never used by anyone. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
84fe526
to
60ff0ec
Compare
@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) { |
There was a problem hiding this comment.
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>
60ff0ec
to
966c7c2
Compare
@athanatos Done and thanks for the confirmation. |
cba31f5
to
73a9b56
Compare
@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. |
73a9b56
to
966c7c2
Compare
@athanatos Sure. |
No description provided.