Introduce ocf_lru_add_free() function
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
b82d30a0ef
commit
a947127f55
@ -1027,3 +1027,12 @@ uint32_t ocf_lru_num_free(ocf_cache_t cache)
|
||||
{
|
||||
return env_atomic_read(&cache->free.runtime->curr_size);
|
||||
}
|
||||
|
||||
void ocf_lru_add_free(ocf_cache_t cache, ocf_cache_line_t cline)
|
||||
{
|
||||
uint32_t lru_list = (cline % OCF_NUM_LRU_LISTS);
|
||||
struct ocf_lru_list *list;
|
||||
|
||||
list = ocf_lru_get_list(&cache->free, lru_list, true);
|
||||
add_lru_head_nobalance(cache, list, cline);
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ void ocf_lru_clean(ocf_cache_t cache, struct ocf_user_part *user_part,
|
||||
ocf_queue_t io_queue, uint32_t count);
|
||||
void ocf_lru_repart(ocf_cache_t cache, ocf_cache_line_t cline,
|
||||
struct ocf_part *src_upart, struct ocf_part *dst_upart);
|
||||
void ocf_lru_add_free(ocf_cache_t cache, ocf_cache_line_t cline);
|
||||
uint32_t ocf_lru_num_free(ocf_cache_t cache);
|
||||
void ocf_lru_populate(ocf_cache_t cache, ocf_cache_line_t num_free_clines);
|
||||
struct ocf_lru_list *ocf_lru_get_list(struct ocf_part *part,
|
||||
|
Loading…
Reference in New Issue
Block a user