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
os/bluestore: OpSequencer: reduce kv_submitted_waiters if _is_all_kv_submitted() return true. #18622
Conversation
…eturn true. Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/bluestore/BlueStore.h
Outdated
@@ -1741,6 +1741,7 @@ class BlueStore : public ObjectStore, | |||
// sure those threads see waiters and signal qcond. | |||
++kv_submitted_waiters; | |||
if (_is_all_kv_submitted()) { | |||
--kv_submitted_waiters; |
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.
nit: we can just do ++kv_submitted_waiters in else clause...
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.
But the comments: // set flag before the check because the condition
// may become true outside qlock, and we need to make
// sure those threads see waiters and signal qcond.
++kv_submitted_waiters;
I think move in else condition is wrong.
src/os/bluestore/BlueStore.h
Outdated
@@ -1740,7 +1738,7 @@ class BlueStore : public ObjectStore, | |||
// may become true outside qlock, and we need to make | |||
// sure those threads see waiters and signal qcond. | |||
++kv_submitted_waiters; | |||
if (_is_all_kv_submitted()) { | |||
if (!q.empty() && _is_all_kv_submitted()) { |
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.
what's about q.empty() == true case?
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.
Move q.empty() from _is_all_kv_submitted to this. Most call _is_all_kv_submitted is the situation q.empyt() == false. So i move code . Because flush() should first check q whether empty.
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.
Before your changes q.empty() == true caused return here. Now it doesn't. Hence the new behavior isn't identical. Is that expected? I suppose proper condition should be (q.empty() || is_all_kv_submitted())
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.
Yes. you are right. Thanks!
da2ad8d
to
aedb6a1
Compare
@ifed01, update. please review. |
Most call _is_all_kv_submitted under the situation: q.empty() is false. Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
while master is green. dropping from my test batch for now. |
@tchaikov . Sorry i don't understand what's mean" while master is green". It mean my PR has problem. Or? |
sorry, i forgot to post the test result on master: http://pulpito.ceph.com/kchai-2017-11-09_02:25:40-rados-master-distro-basic-smithi/ i suspect that your PR is causing this issue. |
From the stack info, it's about filestore rather than bluestore. |
@majianpeng mind taking a look at /a/kchai-2017-11-09_02:58:01-rados-wip-kefu-testing-2017-11-08-1620-distro-basic-mira/1827920? |
@tchaikov . From http://qa-proxy.ceph.com/teuthology/kchai-2017-11-09_02:58:01-rados-wip-kefu-testing-2017-11-08-1620-distro-basic-mira/1827920/teuthology.log: Or am i miss something? |
@majianpeng /a//kchai-2017-11-09_02:58:01-rados-wip-kefu-testing-2017-11-08-1620-distro-basic-mira/1827917/remote/mira037/log/valgrind/osd.0.log.gz |
@tchaikov . I didn't find /a//kchai-2017-11-09_02:58:01-rados-wip-kefu-testing-2017-11-08-1620-distro-basic-mira/1827917/remote/mira037/log/valgrind/osd.0.log.gz. Could you give me a link? Thanks |
No description provided.