[PATCH v2] mempool: introduce statistics reset function

Morten Brørup mb at smartsharesystems.com
Fri Feb 27 22:24:00 CET 2026


> From: fengchengwen [mailto:fengchengwen at huawei.com]
> Sent: Friday, 27 February 2026 10.20
> 
> Acked-by: Chengwen Feng <fengchengwen at huawei.com>
> 
> Another question:
>    How about the overload of mempool stats, If the cost is low, can we
>    remove the debug macro? As far as I know, some DPDK applications
> enable
>    mempool statistics (maybe self-impl) in the production environment,
>    which is mainly used to help locate problems.

Mempool is a core library, so even though the overhead of the mempool statistics is relatively low cost, it is a debug-only facility, and the extra overhead should be not be forced upon users.
IMO, we should keep it build time configurable.

You do raise a good point about the balance tradeoff!
Maybe enabling it for production is worth it for the majority of users. In SmartShare Systems, we enable it for production too. 

We should discuss changing the default from disabled to enabled.



More information about the dev mailing list