-
Notifications
You must be signed in to change notification settings - Fork 21
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
github issue #159: Setup CP periodic timer and dirty buf exceed callback #182
Conversation
@@ -46,6 +50,11 @@ void CPManager::start(bool first_time_boot) { | |||
create_first_cp(); | |||
m_sb.write(); | |||
} | |||
|
|||
LOGINFO("cp timer is set to {} usec", HS_DYNAMIC_CONFIG(generic.cp_timer_us)); |
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.
it is here instead of constructor to make some of the recover test happy.
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #182 +/- ##
==========================================
+ Coverage 48.48% 48.51% +0.02%
==========================================
Files 94 94
Lines 7452 7462 +10
Branches 956 958 +2
==========================================
+ Hits 3613 3620 +7
- Misses 3463 3469 +6
+ Partials 376 373 -3
☔ View full report in Codecov by Sentry. |
@@ -35,6 +36,9 @@ CPManager::CPManager() : | |||
[this](meta_blk* mblk, sisl::byte_view buf, size_t size) { on_meta_blk_found(std::move(buf), (void*)mblk); }, | |||
nullptr); | |||
|
|||
resource_mgr().register_dirty_buf_exceed_cb( |
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.
Should we wait for cp flush to complete in this exceeded size 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.
cp manager controls this, right? If a cp is running, a back-2-back cp will be created.
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.
Q: will dirty_buf_exceed_cb
every time a new dirty_buf added after exceeding the limit?
Trying to avoid the case that we exceeded the dirty limit for a moment and a lot of unnecessary CP get triggered.
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.
CP manager will garunteen only one cp can be running at anytime. e.g. if a cp is already running, it returns immediately. And if consumer asks for a forced trigger_cp, a back-2-back cp will be created.
If cp is slow or stuck (due to bugs or disk issues), it push the back pressure to consumers, e.g. no more dirty buffer can be allocated and push back I/O failures.
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.
LGTM
Test: