Merge pull request #413 from mmichal10/occ-per-ioclass

Occupancy per ioclass
This commit is contained in:
Robert Baldyga
2020-12-21 23:43:54 +01:00
committed by GitHub
25 changed files with 1725 additions and 166 deletions

View File

@@ -11,7 +11,7 @@
#define PARTITION_DEFAULT 0
#define PARTITION_INVALID ((ocf_part_id_t)-1)
#define PARTITION_SIZE_MAX ((ocf_cache_line_t)-1)
#define PARTITION_SIZE_MAX 100
void ocf_metadata_get_partition_info(
struct ocf_cache *cache, ocf_cache_line_t line,

View File

@@ -11,26 +11,26 @@
#include "../eviction/eviction.h"
struct ocf_user_part_config {
char name[OCF_IO_CLASS_NAME_MAX];
uint32_t min_size;
uint32_t max_size;
int16_t priority;
ocf_cache_mode_t cache_mode;
struct {
uint8_t valid : 1;
uint8_t added : 1;
uint8_t eviction : 1;
/*!< This bits is setting during partition sorting,
* and means that can evict from this partition
*/
} flags;
char name[OCF_IO_CLASS_NAME_MAX];
uint32_t min_size;
uint32_t max_size;
int16_t priority;
ocf_cache_mode_t cache_mode;
struct {
uint8_t valid : 1;
uint8_t added : 1;
uint8_t eviction : 1;
/*!< This bits is setting during partition sorting,
* and means that can evict from this partition
*/
} flags;
};
struct ocf_user_part_runtime {
uint32_t curr_size;
uint32_t head;
struct eviction_policy eviction[OCF_NUM_EVICTION_LISTS];
struct cleaning_policy cleaning;
uint32_t curr_size;
uint32_t head;
struct eviction_policy eviction[OCF_NUM_EVICTION_LISTS];
struct cleaning_policy cleaning;
};
/* Iterator state, visiting all eviction lists within a partition