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

Fix updating hot cachelines cleaning list #458

Merged
merged 1 commit into from
Feb 11, 2021

Conversation

mmichal10
Copy link
Contributor

@mmichal10 mmichal10 commented Feb 9, 2021

Update cacheline's timestamp each time it's being written.

Fixes #455

Signed-off-by: Michal Mielewczyk michal.mielewczyk@intel.com

@codecov
Copy link

codecov bot commented Feb 9, 2021

Codecov Report

Merging #458 (c458791) into master (cbbee0c) will increase coverage by 0.05%.
The diff coverage is 94.44%.

@@            Coverage Diff             @@
##           master     #458      +/-   ##
==========================================
+ Coverage   62.85%   62.90%   +0.05%     
==========================================
  Files          82       83       +1     
  Lines        9430     9447      +17     
==========================================
+ Hits         5927     5943      +16     
- Misses       3503     3504       +1     
Impacted Files Coverage Δ
src/utils/utils_cache_line.h 84.61% <ø> (ø)
src/utils/utils_request.c 93.75% <93.75%> (ø)
src/engine/engine_wb.c 83.33% <100.00%> (+0.23%) ⬆️
src/utils/utils_cache_line.c 100.00% <100.00%> (ø)

@@ -42,6 +43,9 @@ static void _ocf_write_wb_update_bits(struct ocf_request *req)

ocf_req_hash_unlock_wr(req);
}

if (ocf_engine_mapped_count(req) > 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

So you will not call "set_hot" in case of full miss? I think it's incorrect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I've changed the code to call set_hot() unconditionally because I couldn't came up with any scenario when a write IO would be submitted in WB and the timestamp shouldn't be updated.

arutk
arutk previously approved these changes Feb 10, 2021
Update cacheline's timestamp each time it's being written.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache lines' access timestamp in cleaning policy metadata not being updated
4 participants