Use management queue for parallelized management operations

When IO queues are used for parallelized management operations,
e.g. changing cleaning policy, a deadlock may occur due to global
metadata lock interfering with taking request from IO queue,
as they might be run on the same thread. As a workaround using
a management queue specifically for such operations eliminates
this problem.

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
This commit is contained in:
Rafal Stefanowski
2024-09-23 12:13:33 +02:00
parent d8994e886e
commit 97ee3af8f7
7 changed files with 15 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -882,7 +883,7 @@ void ocf_metadata_init_collision(ocf_pipeline_t pipeline, void *priv,
result = ocf_parallelize_create(&parallelize, cache,
ocf_cache_get_queue_count(cache), sizeof(*context),
ocf_metadata_init_collision_handle,
ocf_metadata_init_finish);
ocf_metadata_init_finish, false);
if (result)
OCF_PL_FINISH_RET(pipeline, result);
@@ -934,7 +935,7 @@ void ocf_metadata_init_hash_table(ocf_pipeline_t pipeline, void *priv,
result = ocf_parallelize_create(&parallelize, cache,
ocf_cache_get_queue_count(cache), sizeof(*context),
ocf_metadata_init_hash_table_handle,
ocf_metadata_init_finish);
ocf_metadata_init_finish, false);
if (result)
OCF_PL_FINISH_RET(pipeline, result);