@@ -228,6 +228,12 @@ void ocf_engine_lookup(struct ocf_request *req)
|
||||
ocf_engine_lookup_map_entry(cache, entry, core_id,
|
||||
core_line);
|
||||
|
||||
/*
|
||||
* The flag could have been set on the previous lookup, but
|
||||
* cache line might be remapped in the meantime.
|
||||
*/
|
||||
entry->re_part = false;
|
||||
|
||||
if (entry->status != LOOKUP_HIT) {
|
||||
/* There is miss then lookup for next map entry */
|
||||
OCF_DEBUG_PARAM(cache, "Miss, core line = %llu",
|
||||
@@ -267,6 +273,11 @@ int ocf_engine_check(struct ocf_request *req)
|
||||
core_line <= req->core_line_last; core_line++, i++) {
|
||||
|
||||
struct ocf_map_info *entry = &(req->map[i]);
|
||||
/*
|
||||
* The flag could have been set on the previous traverse, but
|
||||
* cache line might be remapped in the meantime.
|
||||
*/
|
||||
entry->re_part = false;
|
||||
|
||||
if (entry->status == LOOKUP_MISS) {
|
||||
continue;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2024 Huawei Technologies
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@@ -107,16 +108,6 @@ void ocf_user_part_move(struct ocf_request *req)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Moving cachelines to another partition is needed only
|
||||
* for those already mapped before this request and remapped
|
||||
* cachelines are assigned to target partition during eviction.
|
||||
* So only hit cachelines are interesting.
|
||||
*/
|
||||
if (entry->status != LOOKUP_HIT) {
|
||||
/* No HIT */
|
||||
continue;
|
||||
}
|
||||
|
||||
line = entry->coll_idx;
|
||||
id_old = ocf_metadata_get_partition_id(cache, line);
|
||||
id_new = req->part_id;
|
||||
@@ -124,6 +115,13 @@ void ocf_user_part_move(struct ocf_request *req)
|
||||
ENV_BUG_ON(id_old >= OCF_USER_IO_CLASS_MAX ||
|
||||
id_new >= OCF_USER_IO_CLASS_MAX);
|
||||
|
||||
if (unlikely(entry->status == LOOKUP_MISS)) {
|
||||
ocf_cache_log(cache, log_err, "Attempt to remap "
|
||||
"an unmapped cache line from ioclass "
|
||||
"%hu to ioclass %hu\n", id_old, id_new);
|
||||
ENV_BUG();
|
||||
}
|
||||
|
||||
if (id_old == id_new) {
|
||||
/* Partition of the request and cache line is the same,
|
||||
* no need to change partition
|
||||
|
Reference in New Issue
Block a user