Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-16930 pool: Debug active map bulks #15761

Draft
wants to merge 1 commit into
base: release/2.6
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/pool/srv_util.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright 2016-2024 Intel Corporation.

Check failure on line 2 in src/pool/srv_util.c

View workflow job for this annotation

GitHub Actions / Copyright check

Copyright out of date
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -143,6 +143,10 @@
return 0;
}

static uint64_t n_map_bulks;
static uint64_t n_map_bulks_max;
static const uint64_t n_map_bulks_per_message = 100;

/*
* Transfer the pool map buffer to "remote_bulk". If the remote bulk buffer is
* too small, then return -DER_TRUNC and set "required_buf_size" to the local
Expand Down Expand Up @@ -184,6 +188,12 @@
rc = crt_bulk_create(rpc->cr_ctx, &map_sgl, CRT_BULK_RO, &bulk);
if (rc != 0)
goto out;
n_map_bulks++;
if (n_map_bulks > n_map_bulks_max)
n_map_bulks_max = n_map_bulks;
if (n_map_bulks % n_map_bulks_per_message == 0)
D_INFO("++: n_map_bulks=" DF_U64 " n_map_bulks_max=" DF_U64 "\n", n_map_bulks,
n_map_bulks_max);

/* Prepare "map_desc" for crt_bulk_transfer(). */
map_desc.bd_rpc = rpc;
Expand Down Expand Up @@ -216,6 +226,10 @@
ABT_eventual_free(&eventual);
out_bulk:
crt_bulk_free(bulk);
n_map_bulks--;
if (n_map_bulks % n_map_bulks_per_message == 0)
D_INFO("--: n_map_bulks=" DF_U64 " n_map_bulks_max=" DF_U64 "\n", n_map_bulks,
n_map_bulks_max);
out:
return rc;
}
Expand Down
Loading