Skip to content

Conversation

@mmichal10
Copy link
Contributor

No description provided.

@mmichal10 mmichal10 added the RFC Request For Comments label Oct 16, 2025
@mmichal10 mmichal10 force-pushed the alru-threshold-tests branch from d5d0f65 to 5eeaaa0 Compare October 16, 2025 08:58
@mmichal10 mmichal10 force-pushed the alru-threshold-tests branch from 5eeaaa0 to 902f9c9 Compare October 16, 2025 13:52
activity_threshold: int | None = None,
dirty_ratio_threshold: int | None = None,
dirty_ratio_inertia: Size | None = None,
dirty_ratio_inertia: int | None = None,
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor Author

@mmichal10 mmichal10 Oct 17, 2025

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?

@mmichal10 mmichal10 force-pushed the alru-threshold-tests branch from 902f9c9 to fb908b8 Compare October 16, 2025 17:50
@mmichal10 mmichal10 removed the RFC Request For Comments label Oct 16, 2025
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>
@mmichal10 mmichal10 force-pushed the alru-threshold-tests branch 2 times, most recently from b4e3b8b to 90f2a8f Compare October 17, 2025 10:30
Co-authored-by: aider (gpt-5) <aider@aider.chat>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
@mmichal10 mmichal10 force-pushed the alru-threshold-tests branch from 90f2a8f to badbafb Compare October 17, 2025 13:30
Co-authored-by: aider (gpt-5) <aider@aider.chat>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
@mmichal10 mmichal10 force-pushed the alru-threshold-tests branch from badbafb to 8e374bb Compare October 17, 2025 13:32
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.

3 participants