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

@@ -20,6 +20,7 @@
#include "cleaning/cleaning.h"
#include "ocf_logger_priv.h"
#include "ocf/ocf_trace.h"
#include "promotion/promotion.h"
#define DIRTY_FLUSHED 1
#define DIRTY_NOT_FLUSHED 0
@@ -149,6 +150,7 @@ struct ocf_cache {
struct ocf_cleaner cleaner;
struct ocf_metadata_updater metadata_updater;
ocf_promotion_policy_t promotion_policy;
struct ocf_async_lock lock;