Per-cpu refcounters

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
Signed-off-by: Jan Musial <jan.musial@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
This commit is contained in:
Adam Rutkowski
2020-07-01 20:26:27 +02:00
committed by Michal Mielewczyk
parent c200c24344
commit 53ee7c1d3a
21 changed files with 320 additions and 204 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* Copyright(c) 2024-2025 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -15,7 +15,6 @@
#include "metadata/metadata_structs.h"
#include "utils/utils_list.h"
#include "utils/utils_pipeline.h"
#include "utils/utils_refcnt.h"
#include "utils/utils_async_lock.h"
#include "ocf_stats_priv.h"
#include "cleaning/cleaning.h"
@@ -79,14 +78,14 @@ struct ocf_cache {
struct {
/* cache get/put counter */
struct ocf_refcnt cache __attribute__((aligned(64)));
struct env_refcnt cache;
/* # of requests potentially dirtying cachelines */
struct ocf_refcnt dirty __attribute__((aligned(64)));
struct env_refcnt dirty;
/* # of requests accessing attached metadata, excluding
* management reqs */
struct ocf_refcnt metadata __attribute__((aligned(64)));
struct env_refcnt metadata;
/* # of requests in d2c mode */
struct ocf_refcnt d2c;
struct env_refcnt d2c;
} refcnt;
struct {