Add LOOKUP_REMAPPED status to allow iterative cacheline lock

Allowing request cacheline lock to be called on partially
locked request. This is going to be usefull for upcomming
eviction improvements, where request will first have evicted
(LOOKUP_REMAPPED) cachelines assigned to it in a locked state,
followed by standard request cacheline lock call in order to
lock previously inserted (LOOKUP_HIT) or mapped from freelist
(LOOKUP_INSERTED) cachelines.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2021-03-05 11:20:46 +01:00
parent b34f5fd721
commit 07d1079baa
3 changed files with 39 additions and 20 deletions

View File

@@ -12,6 +12,7 @@ struct ocf_request;
#define LOOKUP_HIT 5
#define LOOKUP_MISS 6
#define LOOKUP_INSERTED 8
#define LOOKUP_REMAPPED 9
typedef enum {
/* modes inherited from user API */

View File

@@ -137,6 +137,7 @@ void ocf_engine_update_req_info(struct ocf_cache *cache,
req->info.seq_req = false;
break;
case LOOKUP_INSERTED:
case LOOKUP_REMAPPED:
break;
default:
ENV_BUG();
@@ -298,6 +299,7 @@ static void ocf_engine_map_hndl_error(struct ocf_cache *cache,
break;
case LOOKUP_INSERTED:
case LOOKUP_REMAPPED:
OCF_DEBUG_RQ(req, "Canceling cache line %u",
entry->coll_idx);