-
Notifications
You must be signed in to change notification settings - Fork 8
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
[experimental]Set cleaning policy #27
base: experimental
Are you sure you want to change the base?
Conversation
Add RPC methods for changing cleaning policy and parameters: - bdev_ocf_set_cleaning_alru - bdev_ocf_set_cleaning_acp - bdev_ocf_set_cleaning_nop Signed-off-by: Rafal Stefanowski <[email protected]>
Hello @rafalste! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
p = subparsers.add_parser('bdev_ocf_set_cleaning_alru', | ||
help='Set ALRU cleaning policy with parameters on OCF cache device') | ||
p.add_argument('name', help='Name of OCF bdev') | ||
p.add_argument('-w', '--wake-up', type=int, default=-1, |
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.
I think it might be better to set the default implicitly to 20 here (and other default values too) and not base it on defaults in OCF? In that case changing the type to uint32 would also be useful, I think.
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.
I think there are two problems with your proposed approach:
- SPDK maintainers prefer to be as independent as possible from any hard-coded values. This way, when we change OCF defaults in the future, there will be no need to update them also in SPDK adapter.
- Some of those parameters takes a range from 0 to some value, so the default=-1 informs of no change to that particular parameter. I think it will be much more obfuscated to handle this situation using different type of variable here.
Add RPC methods for changing cleaning policy and parameters:
Signed-off-by: Rafal Stefanowski [email protected]