-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce mechanism to turn off dual-copy aggregation code
To provide the producer a lock-free write mechanism for aggregations, we have two copies of aggregations. The producer updates both, in turn, and the consumer reads the one not being written, as indicated by a latch sequence number. Currently, however, we are using older kernels that do not allow us to mmap BPF maps. The consumer is forced to lookup the entire BPF aggregation map at once, making the dual-copy mechanism useless. Meanwhile, the dual copies are consuming valuable BPF map space. Introduce a preprocessor macro DT_AGG_NUM_COPIES that can be set to turn off the dual-copy mechanism for now while retaining the code for when we want to restore the mechanism. For example, the D script BEGIN {x = 100; @ = lquantize(x, 0, 2045, 1); exit(0) } runs, but increasing to 2046 fails. With DT_AGG_NUM_COPIES=1, one can go up to 4093. The latch sequence number is preserved since it is used to see which aggregations have data and should be reported. Signed-off-by: Eugene Loh <eugene.loh@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information
Showing
4 changed files
with
81 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters