-
Notifications
You must be signed in to change notification settings - Fork 4
Fix ReaperSkippingSlabTraversalWhileSlabReleasing test #19
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
Conversation
igchor
left a comment
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.
Please add some description to the commit. What was the problem and how does this fix it?
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @byrnedj and @vinser52)
cachelib/allocator/CacheAllocator-inl.h line 1644 at r1 (raw file):
TierId tid, PoolId pid, Item& item) { if(item.isChainedItem()) return {}; // TODO: We do not support ChainedItem yet if(item.isExpired()) {
nit: you could use removeIfExpired (if you can get a handle first or change the predicate).
igchor
left a comment
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @byrnedj and @vinser52)
41f5d13 to
24db3e3
Compare
The issue was caused by incorrect behaviour of the CacheAllocator<CacheTrait>::tryEvictToNextMemoryTier method in case the evicted item is expired. We cannot simply return a handle to it, but we need to remove it from the access container and MM container.
24db3e3 to
187bbf4
Compare
vinser52
left a comment
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.
Done
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @byrnedj and @igchor)
cachelib/allocator/CacheAllocator-inl.h line 1644 at r1 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
nit: you could use removeIfExpired (if you can get a handle first or change the predicate).
I saw removeIfExpired() function. But I do not want to use it because tryEvictToNextMemoryTier() function can be called on the hot path. And removeIfExpired() function calls accessContainer_->removeIf() with predicate to check if item is expired. Internally it grabs the bucket lock. I think it is too expensive on the hot path.
Furthermore, to call removeIfExpired() function we need to acquire a handle in that particular case. And think it is also might have some overhead because of atomic operation internally. All this action only need if the item is really expired - I believe, more frequently, item.isExpired() is false on this path.
But I have implemented another refactoring. When I did rebase of develop branch I blamed such refactoring... But now doing it by myself.
Less code we touch - less merge conflicts we have during rebase
igchor
left a comment
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.
Reviewed all commit messages.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @byrnedj, @igchor, and @vinser52)
run_tests.sh line 4 at r3 (raw file):
# Newline separated list of tests to ignore BLACKLIST="allocator-test-AllocatorTypeTest
why did you remove that?
vinser52
left a comment
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.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @byrnedj and @igchor)
run_tests.sh line 4 at r3 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
why did you remove that?
I would ask why we have it in the black list. As I remember we created this blacklist to disable tests that are failed even on mainline. But bow this test are passed on mainline.
The issue fixed by this PR was introduced by me when I implemented transparent async Item movement. And if that test was enabled we would catch the issue during initial PR review.
Because this is the test suite that was failing. I agree with the logic behind refactoring removeIf - and it does effect item reaper code path so we may have merge conflicts later with upstream. I can compile and pass all tests. |
vinser52
left a comment
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.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @byrnedj and @igchor)
run_tests.sh line 4 at r3 (raw file):
Because this is the test suite that was failing.
Yeah, I remember it. My point was that we should remove this from blacklist earlier (when test suite was fixed by Meta)
vinser52
left a comment
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.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @byrnedj and @igchor)
run_tests.sh line 4 at r3 (raw file):
Previously, vinser52 (Sergei Vinogradov) wrote…
Because this is the test suite that was failing.
Yeah, I remember it. My point was that we should remove this from blacklist earlier (when test suite was fixed by Meta)
Which merge conflicts did you mean?
This change is