* [PATCH v2] mempool:Add monitor dump for memory pool
[not found] <20221231160738>
@ 2023-01-01 4:24 ` wushaohua
2023-01-01 4:35 ` [PATCH 1/2] " wushaohua
1 sibling, 0 replies; 2+ messages in thread
From: wushaohua @ 2023-01-01 4:24 UTC (permalink / raw)
To: dev; +Cc: wushaohua, wenxu, yangnb1, zoum2
From: wushaohua <wushaohua@chinatelecom.cn>
rte_mempool_dump add dump for monitoring available and
used memory blocks
Signed-off-by: wushaohua <wushaohua@chinatelecom.cn>
---
lib/mempool/rte_mempool.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
index f33f455790..09d512a604 100644
--- a/lib/mempool/rte_mempool.c
+++ b/lib/mempool/rte_mempool.c
@@ -1265,9 +1265,14 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
cache_count = rte_mempool_dump_cache(f, mp);
common_count = rte_mempool_ops_get_count(mp);
+
if ((cache_count + common_count) > mp->size)
common_count = mp->size - cache_count;
fprintf(f, " common_pool_count=%u\n", common_count);
+ fprintf(f, " common_pool_avail_count=%u\n",
+ rte_mempool_avail_count(mp));
+ fprintf(f, " common_pool_used_count=%u\n",
+ rte_mempool_in_use_count(mp));
/* sum and dump statistics */
#ifdef RTE_LIBRTE_MEMPOOL_STATS
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/2] mempool:Add monitor dump for memory pool
[not found] <20221231160738>
2023-01-01 4:24 ` [PATCH v2] mempool:Add monitor dump for memory pool wushaohua
@ 2023-01-01 4:35 ` wushaohua
1 sibling, 0 replies; 2+ messages in thread
From: wushaohua @ 2023-01-01 4:35 UTC (permalink / raw)
To: dev; +Cc: olivier.matz, andrew.rybchenko
From: wushaohua <wushaohua@chinatelecom.cn>
rte_mempool_dump add dump for monitoring available and
used memory blocks
Signed-off-by: wushaohua <wushaohua@chinatelecom.cn>
---
lib/mempool/rte_mempool.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
index f33f455790..09d512a604 100644
--- a/lib/mempool/rte_mempool.c
+++ b/lib/mempool/rte_mempool.c
@@ -1265,9 +1265,14 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
cache_count = rte_mempool_dump_cache(f, mp);
common_count = rte_mempool_ops_get_count(mp);
+
if ((cache_count + common_count) > mp->size)
common_count = mp->size - cache_count;
fprintf(f, " common_pool_count=%u\n", common_count);
+ fprintf(f, " common_pool_avail_count=%u\n",
+ rte_mempool_avail_count(mp));
+ fprintf(f, " common_pool_used_count=%u\n",
+ rte_mempool_in_use_count(mp));
/* sum and dump statistics */
#ifdef RTE_LIBRTE_MEMPOOL_STATS
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-01 4:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20221231160738>
2023-01-01 4:24 ` [PATCH v2] mempool:Add monitor dump for memory pool wushaohua
2023-01-01 4:35 ` [PATCH 1/2] " wushaohua
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).