[experimental]Set cleaning policy#27
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 <rafal.stefanowski@intel.com>
|
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.
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.
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.
|
SPDK manages code review in https://review.spdk.io. This PR will be closed automatically. |
Add RPC methods for changing cleaning policy and parameters:
Signed-off-by: Rafal Stefanowski rafal.stefanowski@intel.com