From 056217d1031d1dec43a5f066886467e9520c0605 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Fri, 5 Mar 2021 11:20:46 +0100 Subject: [PATCH] Rename cleaner attribute cache_line_lock to lock_cacheline .. to make it clean that true means cleaner must lock cachelines rather than the lock is already being held. Signed-off-by: Adam Rutkowski --- src/cleaning/acp.c | 2 +- src/cleaning/alru.c | 2 +- src/engine/engine_common.c | 2 +- src/eviction/lru.c | 2 +- src/mngt/ocf_mngt_flush.c | 2 +- src/utils/utils_cleaner.c | 2 +- src/utils/utils_cleaner.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cleaning/acp.c b/src/cleaning/acp.c index 6441749..865216b 100644 --- a/src/cleaning/acp.c +++ b/src/cleaning/acp.c @@ -496,7 +496,7 @@ static void _acp_flush(struct acp_context *acp) struct ocf_cleaner_attribs attribs = { .cmpl_context = acp, .cmpl_fn = _acp_flush_end, - .cache_line_lock = false, + .lock_cacheline = false, .do_sort = false, .io_queue = cache->cleaner.io_queue, }; diff --git a/src/cleaning/alru.c b/src/cleaning/alru.c index dbea378..704fec1 100644 --- a/src/cleaning/alru.c +++ b/src/cleaning/alru.c @@ -816,7 +816,7 @@ void cleaning_alru_perform_cleaning(ocf_cache_t cache, ocf_cleaner_end_t cmpl) fctx->attribs.cmpl_context = fctx; fctx->attribs.cmpl_fn = alru_clean_complete; - fctx->attribs.cache_line_lock = true; + fctx->attribs.lock_cacheline = true; fctx->attribs.do_sort = true; fctx->attribs.io_queue = cache->cleaner.io_queue; diff --git a/src/engine/engine_common.c b/src/engine/engine_common.c index ee8b7e6..586fb6c 100644 --- a/src/engine/engine_common.c +++ b/src/engine/engine_common.c @@ -564,7 +564,7 @@ void ocf_engine_clean(struct ocf_request *req) { /* Initialize attributes for cleaner */ struct ocf_cleaner_attribs attribs = { - .cache_line_lock = false, + .lock_cacheline = false, .cmpl_context = req, .cmpl_fn = _ocf_engine_clean_end, diff --git a/src/eviction/lru.c b/src/eviction/lru.c index c3bbc5a..8243f31 100644 --- a/src/eviction/lru.c +++ b/src/eviction/lru.c @@ -377,7 +377,7 @@ static void evp_lru_clean(ocf_cache_t cache, ocf_queue_t io_queue, { struct ocf_refcnt *counter = &part->cleaning; struct ocf_cleaner_attribs attribs = { - .cache_line_lock = true, + .lock_cacheline = true, .do_sort = true, .cmpl_context = &part->eviction_clean_iter, diff --git a/src/mngt/ocf_mngt_flush.c b/src/mngt/ocf_mngt_flush.c index 5c2b561..da55c26 100644 --- a/src/mngt/ocf_mngt_flush.c +++ b/src/mngt/ocf_mngt_flush.c @@ -438,7 +438,7 @@ static void _ocf_mngt_flush_container( req->priv = fc; fc->req = req; - fc->attribs.cache_line_lock = true; + fc->attribs.lock_cacheline = true; fc->attribs.cmpl_context = fc; fc->attribs.cmpl_fn = _ocf_mngt_flush_portion_end; fc->attribs.io_queue = cache->mngt_queue; diff --git a/src/utils/utils_cleaner.c b/src/utils/utils_cleaner.c index b4596d6..facb7c7 100644 --- a/src/utils/utils_cleaner.c +++ b/src/utils/utils_cleaner.c @@ -46,7 +46,7 @@ static struct ocf_request *_ocf_cleaner_alloc_req(struct ocf_cache *cache, return NULL; req->info.internal = true; - req->info.cleaner_cache_line_lock = attribs->cache_line_lock; + req->info.cleaner_cache_line_lock = attribs->lock_cacheline; /* Allocate pages for cleaning IO */ req->data = ctx_data_alloc(cache->owner, diff --git a/src/utils/utils_cleaner.h b/src/utils/utils_cleaner.h index 20e3dab..7cd7667 100644 --- a/src/utils/utils_cleaner.h +++ b/src/utils/utils_cleaner.h @@ -26,7 +26,7 @@ typedef int (*ocf_cleaner_get_item)(struct ocf_cache *cache, * @brief Cleaning attributes for clean request */ struct ocf_cleaner_attribs { - uint8_t cache_line_lock : 1; /*!< Clean under cache line lock */ + uint8_t lock_cacheline : 1; /*!< Cleaner to lock cachelines on its own */ uint8_t do_sort : 1; /*!< Sort cache lines which will be cleaned */