From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Paul Szczepanek" <paul.szczepanek@arm.com>,
"Frank Du" <frank.du@intel.com>,
"Ferruh Yigit" <ferruh.yigit@amd.com>
Cc: <dev@dpdk.org>
Subject: FW: [PATCH] mempool: dump includes list of memory chunks
Date: Mon, 27 May 2024 14:29:32 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F4B4@smartserver.smartshare.dk> (raw)
PING for review.
@Paul, @Du and @Ferruh, if you think the information provided by this patch would have been useful for your recent work with the mempool, please Review or ACK it.
-Morten
From: Morten Brørup [mailto:mb@smartsharesystems.com]
Sent: Thursday, 16 May 2024 11.00
Added information about the memory chunks holding the objects in the
mempool when dumping the status of the mempool to a file.
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/mempool/rte_mempool.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
index 12390a2c81..e9a8a5b411 100644
--- a/lib/mempool/rte_mempool.c
+++ b/lib/mempool/rte_mempool.c
@@ -1230,6 +1230,7 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
#endif
struct rte_mempool_memhdr *memhdr;
struct rte_mempool_ops *ops;
+ unsigned int n;
unsigned common_count;
unsigned cache_count;
size_t mem_len = 0;
@@ -1264,6 +1265,15 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
(long double)mem_len / mp->size);
}
+ fprintf(f, " mem_list:\n");
+ n = 0;
+ STAILQ_FOREACH(memhdr, &mp->mem_list, next) {
+ fprintf(f, " addr[%u]=%p\n", n, memhdr->addr);
+ fprintf(f, " iova[%u]=0x%" PRIx64 "\n", n, memhdr->iova);
+ fprintf(f, " len[%u]=%zu\n", n, memhdr->len);
+ n++;
+ }
+
cache_count = rte_mempool_dump_cache(f, mp);
common_count = rte_mempool_ops_get_count(mp);
if ((cache_count + common_count) > mp->size)
--
2.17.1
reply other threads:[~2024-05-27 12:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98CBD80474FA8B44BF855DF32C47DC35E9F4B4@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=frank.du@intel.com \
--cc=paul.szczepanek@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).