Move all eviction locks to lru.c
this is preparation for removal of evp abstraction Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
77bccba036
commit
31737ee0e7
@ -289,10 +289,13 @@ void evp_lru_rm_cline(ocf_cache_t cache, ocf_cache_line_t cline)
|
|||||||
ENV_BUG_ON(part_id > OCF_USER_IO_CLASS_MAX);
|
ENV_BUG_ON(part_id > OCF_USER_IO_CLASS_MAX);
|
||||||
part = &cache->user_parts[part_id].part;
|
part = &cache->user_parts[part_id].part;
|
||||||
|
|
||||||
|
OCF_METADATA_EVICTION_WR_LOCK(cline);
|
||||||
|
|
||||||
list = evp_get_cline_list(cache, cline);
|
list = evp_get_cline_list(cache, cline);
|
||||||
free = evp_lru_get_list(&cache->free, ev_list, true);
|
free = evp_lru_get_list(&cache->free, ev_list, true);
|
||||||
|
|
||||||
evp_lru_move(cache, cline, part, list, &cache->free, free);
|
evp_lru_move(cache, cline, part, list, &cache->free, free);
|
||||||
|
|
||||||
|
OCF_METADATA_EVICTION_WR_UNLOCK(cline);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void evp_lru_repart_locked(ocf_cache_t cache, ocf_cache_line_t cline,
|
static void evp_lru_repart_locked(ocf_cache_t cache, ocf_cache_line_t cline,
|
||||||
|
@ -36,9 +36,7 @@ static inline void ocf_eviction_purge_cache_line(
|
|||||||
ENV_BUG_ON(type >= ocf_eviction_max);
|
ENV_BUG_ON(type >= ocf_eviction_max);
|
||||||
|
|
||||||
if (likely(evict_policy_ops[type].rm_cline)) {
|
if (likely(evict_policy_ops[type].rm_cline)) {
|
||||||
OCF_METADATA_EVICTION_WR_LOCK(line);
|
|
||||||
evict_policy_ops[type].rm_cline(cache, line);
|
evict_policy_ops[type].rm_cline(cache, line);
|
||||||
OCF_METADATA_EVICTION_WR_UNLOCK(line);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user