[PATCH v4 2/3] mempool: add stats for unregistered non-EAL threads
Andrew Rybchenko
andrew.rybchenko at oktetlabs.ru
Sun Nov 6 12:34:13 CET 2022
On 11/4/22 15:03, Morten Brørup wrote:
> This patch adds statistics for unregistered non-EAL threads, which was
> previously not included in the statistics.
>
> Add one more entry to the stats array, and use the last index for
> unregistered non-EAL threads.
>
> The unregistered non-EAL thread statistics are incremented atomically.
>
> In theory, the EAL thread counters should also be accessed atomically to
> avoid tearing on 32 bit architectures. However, it was decided to avoid
> the performance cost of using atomic operations, because:
> 1. these are debug counters, and
> 2. statistics counters in DPDK are usually incremented non-atomically.
>
> v4:
> * No changes.
> v3 (feedback from Mattias Rönnblom):
> * Use correct terminology: Unregistered non-EAL threads.
> * Use atomic counting for the unregistered non-EAL threads.
> * Reintroduce the conditional instead of offsetting the index by one.
> v2:
> * New. No v1 of this patch in the series.
>
> Suggested-by: Stephen Hemminger <stephen at networkplumber.org>
> Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
More information about the dev
mailing list