-
Notifications
You must be signed in to change notification settings - Fork 96
tests: ALRU inertia: don't clean below threshold #1694
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
base: master
Are you sure you want to change the base?
Conversation
d5d0f65 to
5eeaaa0
Compare
5eeaaa0 to
902f9c9
Compare
| activity_threshold: int | None = None, | ||
| dirty_ratio_threshold: int | None = None, | ||
| dirty_ratio_inertia: Size | None = None, | ||
| dirty_ratio_inertia: int | None = None, |
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.
If I would change it I would change it the other way around - that is staleness_time: Time and so on
casadm.py for real life units, cas.py for string-converted
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.
the high level api in cache.py uses Time and Size. Do we need the real life units on two layers of the api?
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.
casadm.py is the everyday api - cache.py just has helpers
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 do you mean by every day api? If a test is testing the behavior of alru, what would be the benefit of using casadm.py api instead of the helper? casadm.py api can be used to test if casadm doesn't accept incorrect values (e.g. negative size) as it's more flexible, but apart from that tests should use the high level api. Besides, all the other functions in this file accept ints as params; how are alru params different from the other cache params?
902f9c9 to
fb908b8
Compare
The casadm api expects that the ALRU params as ints, so the conversion from Size to int must happen in the higher level api Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
b4e3b8b to
90f2a8f
Compare
Co-authored-by: aider (gpt-5) <aider@aider.chat> Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
90f2a8f to
badbafb
Compare
Co-authored-by: aider (gpt-5) <aider@aider.chat> Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
badbafb to
8e374bb
Compare
No description provided.