Add promotion policy API and use it in I/O path

Promotion policy is supposed to perform ALRU noise filtering by
eliminating one-hit wonders being added to cache and polluting it.

Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
Jan Musial
2019-07-11 12:19:29 +02:00
parent 999f3f7245
commit 917cbd859a
20 changed files with 409 additions and 21 deletions

View File

@@ -6,6 +6,9 @@
#ifndef __METADATA_SUPERBLOCK_H__
#define __METADATA_SUPERBLOCK_H__
#include "../eviction/eviction.h"
#include "../promotion/promotion.h"
#define CACHE_MAGIC_NUMBER 0x187E1CA6
/**
@@ -38,6 +41,7 @@ struct ocf_superblock_config {
struct cleaning_policy_config cleaning[CLEANING_POLICY_TYPE_MAX];
ocf_eviction_t eviction_policy_type;
ocf_promotion_t promotion_policy_type;
/* Current core sequence number */
ocf_core_id_t curr_core_seq_no;