DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] mempool: add cache guard to per-lcore debug statistics
@ 2023-09-04  9:10 Morten Brørup
  2023-09-29 18:32 ` Morten Brørup
  2023-09-30  6:24 ` Andrew Rybchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Morten Brørup @ 2023-09-04  9:10 UTC (permalink / raw)
  To: thomas, david.marchand, olivier.matz, andrew.rybchenko,
	bruce.richardson, mattias.ronnblom
  Cc: honnappa.nagarahalli, konstantin.v.ananyev, dev, Morten Brørup

The per-lcore debug statistics, if enabled, are frequently written by
their individual lcores, so add a cache guard to prevent CPU cache
thrashing.

Depends-on: series-29415 ("clarify purpose of empty cache lines")

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/mempool/rte_mempool.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index a05b25d5b9..f70bf36080 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -78,6 +78,7 @@ struct rte_mempool_debug_stats {
 	uint64_t get_fail_objs;        /**< Objects that failed to be allocated. */
 	uint64_t get_success_blks;     /**< Successful allocation number of contiguous blocks. */
 	uint64_t get_fail_blks;        /**< Failed allocation number of contiguous blocks. */
+	RTE_CACHE_GUARD;
 } __rte_cache_aligned;
 #endif
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] mempool: add cache guard to per-lcore debug statistics
  2023-09-04  9:10 [PATCH] mempool: add cache guard to per-lcore debug statistics Morten Brørup
@ 2023-09-29 18:32 ` Morten Brørup
  2023-09-30  6:24 ` Andrew Rybchenko
  1 sibling, 0 replies; 4+ messages in thread
From: Morten Brørup @ 2023-09-29 18:32 UTC (permalink / raw)
  To: Olivier Matz, Andrew Rybchenko
  Cc: honnappa.nagarahalli, konstantin.v.ananyev, dev, thomas,
	david.marchand, bruce.richardson, mattias.ronnblom

PING for review.

> From: Morten Brørup [mailto:mb@smartsharesystems.com]
> Sent: Monday, 4 September 2023 11.10
> 
> The per-lcore debug statistics, if enabled, are frequently written by
> their individual lcores, so add a cache guard to prevent CPU cache
> thrashing.
> 
> Depends-on: series-29415 ("clarify purpose of empty cache lines")
> 
> Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
> ---
>  lib/mempool/rte_mempool.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
> index a05b25d5b9..f70bf36080 100644
> --- a/lib/mempool/rte_mempool.h
> +++ b/lib/mempool/rte_mempool.h
> @@ -78,6 +78,7 @@ struct rte_mempool_debug_stats {
>  	uint64_t get_fail_objs;        /**< Objects that failed to be
> allocated. */
>  	uint64_t get_success_blks;     /**< Successful allocation number
> of contiguous blocks. */
>  	uint64_t get_fail_blks;        /**< Failed allocation number of
> contiguous blocks. */
> +	RTE_CACHE_GUARD;
>  } __rte_cache_aligned;
>  #endif
> 
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mempool: add cache guard to per-lcore debug statistics
  2023-09-04  9:10 [PATCH] mempool: add cache guard to per-lcore debug statistics Morten Brørup
  2023-09-29 18:32 ` Morten Brørup
@ 2023-09-30  6:24 ` Andrew Rybchenko
  2023-10-11 21:28   ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Rybchenko @ 2023-09-30  6:24 UTC (permalink / raw)
  To: Morten Brørup, thomas, david.marchand, olivier.matz,
	bruce.richardson, mattias.ronnblom
  Cc: honnappa.nagarahalli, konstantin.v.ananyev, dev

On 9/4/23 12:10, Morten Brørup wrote:
> The per-lcore debug statistics, if enabled, are frequently written by
> their individual lcores, so add a cache guard to prevent CPU cache
> thrashing.
> 
> Depends-on: series-29415 ("clarify purpose of empty cache lines")
> 
> Signed-off-by: Morten Brørup <mb@smartsharesystems.com>

Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mempool: add cache guard to per-lcore debug statistics
  2023-09-30  6:24 ` Andrew Rybchenko
@ 2023-10-11 21:28   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2023-10-11 21:28 UTC (permalink / raw)
  To: Morten Brørup
  Cc: david.marchand, olivier.matz, bruce.richardson, mattias.ronnblom,
	dev, honnappa.nagarahalli, konstantin.v.ananyev, dev,
	Andrew Rybchenko

30/09/2023 08:24, Andrew Rybchenko:
> On 9/4/23 12:10, Morten Brørup wrote:
> > The per-lcore debug statistics, if enabled, are frequently written by
> > their individual lcores, so add a cache guard to prevent CPU cache
> > thrashing.
> > 
> > Depends-on: series-29415 ("clarify purpose of empty cache lines")
> > 
> > Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
> 
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Applied, thanks.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-11 21:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-04  9:10 [PATCH] mempool: add cache guard to per-lcore debug statistics Morten Brørup
2023-09-29 18:32 ` Morten Brørup
2023-09-30  6:24 ` Andrew Rybchenko
2023-10-11 21:28   ` Thomas Monjalon

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).