From d029b2a2be89a628c90a38124d3bd63d6158bc2e Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Sat, 26 Jun 2021 18:59:23 +0200 Subject: [PATCH] Remove unused pending_eviction_clines counter Signed-off-by: Adam Rutkowski --- src/ocf_cache_priv.h | 2 -- src/ocf_lru.c | 13 ------------- src/ocf_seq_cutoff.c | 2 +- src/ocf_space.h | 2 -- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/ocf_cache_priv.h b/src/ocf_cache_priv.h index 858ba8c..5d713b5 100644 --- a/src/ocf_cache_priv.h +++ b/src/ocf_cache_priv.h @@ -105,8 +105,6 @@ struct ocf_cache { env_atomic pending_read_misses_list_blocked; env_atomic pending_read_misses_list_count; - env_atomic pending_eviction_clines; - env_atomic flush_in_progress; env_mutex flush_mutex; diff --git a/src/ocf_lru.c b/src/ocf_lru.c index 3462a9c..c769b78 100644 --- a/src/ocf_lru.c +++ b/src/ocf_lru.c @@ -657,16 +657,6 @@ void ocf_lru_clean(ocf_cache_t cache, struct ocf_user_part *user_part, ocf_cleaner_fire(cache, &attribs); } -bool ocf_lru_can_evict(ocf_cache_t cache) -{ - if (env_atomic_read(&cache->pending_eviction_clines) >= - OCF_PENDING_EVICTION_LIMIT) { - return false; - } - - return true; -} - static void ocf_lru_invalidate(ocf_cache_t cache, ocf_cache_line_t cline, ocf_core_id_t core_id, ocf_part_id_t part_id) { @@ -730,9 +720,6 @@ uint32_t ocf_lru_req_clines(struct ocf_request *req, i = 0; while (i < cline_no) { - if (!ocf_lru_can_evict(cache)) - break; - if (src_part->id != PARTITION_FREELIST) { cline = lru_iter_eviction_next(&iter, dst_part, &core_id, &core_line); diff --git a/src/ocf_seq_cutoff.c b/src/ocf_seq_cutoff.c index dabf0db..b6f4e33 100644 --- a/src/ocf_seq_cutoff.c +++ b/src/ocf_seq_cutoff.c @@ -11,7 +11,7 @@ #include "ocf/ocf_debug.h" #include "utils/utils_cache_line.h" -#define SEQ_CUTOFF_FULL_MARGIN OCF_PENDING_EVICTION_LIMIT +#define SEQ_CUTOFF_FULL_MARGIN 512 static inline bool ocf_seq_cutoff_is_on(ocf_cache_t cache, struct ocf_request *req) diff --git a/src/ocf_space.h b/src/ocf_space.h index 51b7fa6..61383db 100644 --- a/src/ocf_space.h +++ b/src/ocf_space.h @@ -10,8 +10,6 @@ #include "ocf_lru.h" #include "ocf_lru_structs.h" -#define OCF_PENDING_EVICTION_LIMIT 512UL - #define OCF_NUM_LRU_LISTS 32 struct ocf_part;