[DTrace-devel] [PATCH 5/5] Use array-of-maps as storage for aggregations

Kris Van Hees kris.van.hees at oracle.com
Tue Aug 23 18:25:48 UTC 2022


On Tue, Aug 23, 2022 at 11:34:57AM -0400, Eugene Loh wrote:
> What's puzzling is that we're changing from a fixed area on each CPU to... a
> fixed area on each CPU.  Anyhow, it just seemed to me that that last sentence
> didn't add anything that wasn't already said.

The nuance (which seems to be too obscure as it is current written) is that the
existing implementation was storing all data in the same map value, thereby
introducing complications for concurrent access safety.  The new approach gives
each CPU its own map value to store data to for a given aggregation, which means
that access to the memory area for a specific aggregation on a specific CPU
does not interfere with accesses for the same aggregation on other CPUs.

> â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"â"
> From: Kris Van Hees <kris.van.hees at oracle.com>
> Sent: Monday, August 22, 2022 5:21 PM
> To: Eugene Loh <eugene.loh at oracle.com>
>  
> On Mon, Aug 22, 2022 at 03:28:08PM -0400, Eugene Loh wrote:
> >
> > *)  The last sentence of the commit message is, let's say, "puzzling."  Just
> > drop it?
> 
> What is puzzling about it?
> 
> > From: Kris Van Hees via DTrace-devel <dtrace-devel at oss.oracle.com>
> > Sent: Friday, August 19, 2022 10:26 AM
> > 
> > In preparation for indexed aggregations and the clear() and trunc()
> > operations, the storage for aggregations is moving from a per-CPU
> > array map to an array of maps, indexed by CPU id.  This gives each
> > CPU it's own storage to store aggregation data in.



More information about the DTrace-devel mailing list