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:
@@ -80,14 +80,18 @@ void cache_mngt_core_deinit_attached_meta(ocf_core_t core)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!ocf_cache_line_try_lock_wr(cache, curr_cline))
|
||||
if (!ocf_cache_line_try_lock_wr(
|
||||
cache->device->concurrency.cache_line,
|
||||
curr_cline)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (metadata_test_dirty(cache, curr_cline))
|
||||
ocf_purge_cleaning_policy(cache, curr_cline);
|
||||
ocf_metadata_sparse_cache_line(cache, curr_cline);
|
||||
|
||||
ocf_cache_line_unlock_wr(cache, curr_cline);
|
||||
ocf_cache_line_unlock_wr(cache->device->concurrency.cache_line,
|
||||
curr_cline);
|
||||
|
||||
if (prev_cline != cache->device->collision_table_entries)
|
||||
curr_cline = ocf_metadata_get_collision_next(cache, prev_cline);
|
||||
|
Reference in New Issue
Block a user