Repart all misclassified cache lines
Remapped cache lines my require repartitioning as well Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
parent
b3fa1fc96a
commit
6bfd2122d2
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(c) 2012-2021 Intel Corporation
|
* Copyright(c) 2012-2021 Intel Corporation
|
||||||
|
* Copyright(c) 2024 Huawei Technologies
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -107,16 +108,6 @@ void ocf_user_part_move(struct ocf_request *req)
|
|||||||
continue;
|
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;
|
line = entry->coll_idx;
|
||||||
id_old = ocf_metadata_get_partition_id(cache, line);
|
id_old = ocf_metadata_get_partition_id(cache, line);
|
||||||
id_new = req->part_id;
|
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 ||
|
ENV_BUG_ON(id_old >= OCF_USER_IO_CLASS_MAX ||
|
||||||
id_new >= 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) {
|
if (id_old == id_new) {
|
||||||
/* Partition of the request and cache line is the same,
|
/* Partition of the request and cache line is the same,
|
||||||
* no need to change partition
|
* no need to change partition
|
||||||
|
Loading…
Reference in New Issue
Block a user