@@ -50,11 +50,11 @@ struct ocf_mngt_core_config {
5050 uint32_t seq_cutoff_threshold ;
5151 /*!< Sequential cutoff threshold (in bytes) */
5252
53- uint32_t seq_cutoff_promotion_count ;
54- /*!< Sequential cutoff promotion request count */
53+ uint32_t seq_detect_promotion_count ;
54+ /*!< Sequence detector stream promotion request count */
5555
56- bool seq_cutoff_promote_on_threshold ;
57- /*!< Sequential cutoff promote on threshold */
56+ uint32_t seq_detect_promotion_threshold ;
57+ /*!< Sequence detector stream promotion threshold (in bytes) */
5858
5959 struct {
6060 void * data ;
@@ -75,8 +75,8 @@ static inline void ocf_mngt_core_config_set_default(
7575{
7676 cfg -> try_add = false;
7777 cfg -> seq_cutoff_threshold = 1024 ;
78- cfg -> seq_cutoff_promotion_count = 8 ;
79- cfg -> seq_cutoff_promote_on_threshold = false ;
78+ cfg -> seq_detect_promotion_count = 8 ;
79+ cfg -> seq_detect_promotion_threshold = 0 ;
8080 cfg -> user_metadata .data = NULL ;
8181 cfg -> user_metadata .size = 0 ;
8282}
@@ -1189,79 +1189,77 @@ int ocf_mngt_core_get_seq_cutoff_policy(ocf_core_t core,
11891189 * @retval 0 Sequential cutoff promotion requets count has been set successfully
11901190 * @retval Non-zero Error occured and request count hasn't been updated
11911191 */
1192- int ocf_mngt_core_set_seq_cutoff_promotion_count (ocf_core_t core ,
1192+ int ocf_mngt_core_set_seq_detect_promotion_count (ocf_core_t core ,
11931193 uint32_t count );
11941194
11951195/**
1196- * @brief Set sequential cutoff promotion request count for all cores in cache
1196+ * @brief Set sequence detector promotion request count for all cores in cache
11971197 *
11981198 * @attention This changes only runtime state. To make changes persistent
11991199 * use function ocf_mngt_cache_save().
12001200 *
12011201 * @param[in] cache Cache handle
12021202 * @param[in] count promotion request count
12031203 *
1204- * @retval 0 Sequential cutoff promotion request count has been set successfully
1204+ * @retval 0 Promotion request count has been set successfully
12051205 * @retval Non-zero Error occured and request count hasn't been updated
12061206 */
1207- int ocf_mngt_core_set_seq_cutoff_promotion_count_all (ocf_cache_t cache ,
1207+ int ocf_mngt_core_set_seq_detect_promotion_count_all (ocf_cache_t cache ,
12081208 uint32_t count );
12091209
12101210/**
1211- * @brief Get core sequential cutoff promotion threshold
1211+ * @brief Get sequence detector promotion request count
12121212 *
12131213 * @param[in] core Core handle
12141214 * @param[out] count promotion request count
12151215 *
1216- * @retval 0 Sequential cutoff promotion request count has been get successfully
1216+ * @retval 0 Promotion request count has been retrieved successfully
12171217 * @retval Non-zero Error occured
12181218 */
1219- int ocf_mngt_core_get_seq_cutoff_promotion_count (ocf_core_t core ,
1219+ int ocf_mngt_core_get_seq_detect_promotion_count (ocf_core_t core ,
12201220 uint32_t * count );
12211221
12221222/**
1223- * @brief Set whether to promote core sequential cutoff stream
1224- * to global structures when threshold is reached
1223+ * @brief Set sequence detector stream promotion threshold
12251224 *
12261225 * @attention This changes only runtime state. To make changes persistent
12271226 * use function ocf_mngt_cache_save().
12281227 *
12291228 * @param[in] core Core handle
1230- * @param[in] promote Whether to promote or not
1229+ * @param[in] threshold Promotion threshold (in bytes)
12311230 *
1232- * @retval 0 Sequential cutoff promote on threshold has been set successfully
1233- * @retval Non-zero Error occured and promote on threshold hasn't been updated
1231+ * @retval 0 Promotion threshold has been set successfully
1232+ * @retval Non-zero Error occurred and threshold hasn't been updated
12341233 */
1235- int ocf_mngt_core_set_seq_cutoff_promote_on_threshold (ocf_core_t core ,
1236- bool promote );
1234+ int ocf_mngt_core_set_seq_detect_promotion_threshold (ocf_core_t core ,
1235+ uint32_t threshold );
12371236
12381237/**
1239- * @brief Set whether to promote sequential cutoff stream
1240- * to global structures when threshold is reached for all cores in cache
1238+ * @brief Set sequence detector stream promotion threshold for all cores
12411239 *
12421240 * @attention This changes only runtime state. To make changes persistent
12431241 * use function ocf_mngt_cache_save().
12441242 *
12451243 * @param[in] cache Cache handle
1246- * @param[in] promote Whether to promote or not
1244+ * @param[in] threshold Promotion threshold (in bytes)
12471245 *
1248- * @retval 0 Sequential cutoff promote on threshold has been set successfully
1249- * @retval Non-zero Error occured and promote on threshold hasn't been updated
1246+ * @retval 0 Promotion threshold has been set successfully
1247+ * @retval Non-zero Error occurred and threshold hasn't been updated
12501248 */
1251- int ocf_mngt_core_set_seq_cutoff_promote_on_threshold_all (ocf_cache_t cache ,
1252- bool promote );
1249+ int ocf_mngt_core_set_seq_detect_promotion_threshold_all (ocf_cache_t cache ,
1250+ uint32_t threshold );
12531251
12541252/**
1255- * @brief Get core sequential cutoff promote on threshold switch value
1253+ * @brief Get sequence detector stream promotion threshold
12561254 *
12571255 * @param[in] core Core handle
1258- * @param[out] promote Promote on threshold
1256+ * @param[out] threshold Promotion threshold (in bytes)
12591257 *
1260- * @retval 0 Sequential cutoff promote on threshold retrieved successfully
1258+ * @retval 0 Promotion threshold retrieved successfully
12611259 * @retval Non-zero Error occured and value could not be retrieved
12621260 */
1263- int ocf_mngt_core_get_seq_cutoff_promote_on_threshold (ocf_core_t core ,
1264- bool * promote );
1261+ int ocf_mngt_core_get_seq_detect_promotion_threshold (ocf_core_t core ,
1262+ uint32_t * threshold );
12651263
12661264/**
12671265 * @brief Set cache fallback Pass Through error threshold
0 commit comments