From 9598fa76f12511225f41cdbdcefc8ca5636d29d3 Mon Sep 17 00:00:00 2001 From: Jan Musial Date: Wed, 11 Sep 2019 10:12:03 +0200 Subject: [PATCH] Expose PP settings in IOCTL iface Signed-off-by: Jan Musial --- modules/cas_cache/layer_cache_management.c | 11 +++++++++++ modules/include/cas_ioctl_codes.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/modules/cas_cache/layer_cache_management.c b/modules/cas_cache/layer_cache_management.c index e37741f..6fd1399 100644 --- a/modules/cas_cache/layer_cache_management.c +++ b/modules/cas_cache/layer_cache_management.c @@ -2123,6 +2123,17 @@ int cache_mngt_set_cache_params(struct kcas_set_cache_param *info) ocf_cleaning_acp, ocf_acp_flush_max_buffers, info->param_value); break; + case cache_param_promotion_policy_type: + result = cache_mngt_set_promotion_policy(cache, info->param_value); + break; + case cache_param_promotion_nhit_insertion_threshold: + result = cache_mngt_set_promotion_param(cache, + ocf_nhit_insertion_threshold, info->param_value); + break; + case cache_param_promotion_nhit_trigger_threshold: + result = cache_mngt_set_promotion_param(cache, + ocf_nhit_trigger_threshold, info->param_value); + break; default: result = -EINVAL; } diff --git a/modules/include/cas_ioctl_codes.h b/modules/include/cas_ioctl_codes.h index fa3332e..8f51ac4 100644 --- a/modules/include/cas_ioctl_codes.h +++ b/modules/include/cas_ioctl_codes.h @@ -353,6 +353,9 @@ enum kcas_cache_param_id { cache_param_cleaning_alru_activity_threshold, cache_param_cleaning_acp_wake_up_time, cache_param_cleaning_acp_flush_max_buffers, + cache_param_promotion_policy_type, + cache_param_promotion_nhit_insertion_threshold, + cache_param_promotion_nhit_trigger_threshold, cache_param_id_max, };