
src/eviction/lru.c -> src/ocf_lru.c src/eviction/lru.h -> src/ocf_lru.h src/eviction/lru_structs.h -> src/ocf_lru_structs.h src/eviction/eviction.c -> src/ocf_space.c src/eviction/eviction.h -> src/ocf_space.h .. as well as corresponding UT files. Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com> ... in UT as well Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
32 lines
524 B
C
32 lines
524 B
C
/*
|
|
* Copyright(c) 2012-2021 Intel Corporation
|
|
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
*/
|
|
#ifndef __EVICTION_LRU_STRUCTS_H__
|
|
|
|
#define __EVICTION_LRU_STRUCTS_H__
|
|
|
|
struct ocf_lru_meta {
|
|
uint32_t prev;
|
|
uint32_t next;
|
|
uint8_t hot;
|
|
} __attribute__((packed));
|
|
|
|
struct ocf_lru_list {
|
|
uint32_t num_nodes;
|
|
uint32_t head;
|
|
uint32_t tail;
|
|
uint32_t num_hot;
|
|
uint32_t last_hot;
|
|
bool track_hot;
|
|
};
|
|
|
|
struct ocf_lru_part_meta {
|
|
struct ocf_lru_list clean;
|
|
struct ocf_lru_list dirty;
|
|
};
|
|
|
|
#define OCF_LRU_HOT_RATIO 2
|
|
|
|
#endif
|