Use cline concurrency ctx instead of cache
Cacheline concurrency functions have their interface changed so that the cacheline concurrency private context is explicitly on the parameter list, rather than being taken from cache->device->concurrency.cache_line. Cache pointer is no longer provided as a parameter to these functions. Cacheline concurrency context now has a pointer to cache structure (for logging purposes only). The purpose of this change is to facilitate unit testing. Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
@@ -357,7 +357,9 @@ static int evp_lru_clean_getter(ocf_cache_t cache, void *getter_context,
|
||||
break;
|
||||
|
||||
/* Prevent evicting already locked items */
|
||||
if (ocf_cache_line_is_used(cache, cline)) {
|
||||
if (ocf_cache_line_is_used(
|
||||
cache->device->concurrency.cache_line,
|
||||
cline)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -490,8 +492,11 @@ uint32_t evp_lru_req_clines(ocf_cache_t cache, ocf_queue_t io_queue,
|
||||
break;
|
||||
|
||||
/* Prevent evicting already locked items */
|
||||
if (ocf_cache_line_is_used(cache, cline))
|
||||
if (ocf_cache_line_is_used(
|
||||
cache->device->concurrency.cache_line,
|
||||
cline)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ENV_BUG_ON(metadata_test_dirty(cache, cline));
|
||||
|
||||
|
Reference in New Issue
Block a user