impl/lola: Added shm-size calculation by analysis for DATA/CONTROL#760
Open
crimson11 wants to merge 3 commits into
Open
impl/lola: Added shm-size calculation by analysis for DATA/CONTROL#760crimson11 wants to merge 3 commits into
crimson11 wants to merge 3 commits into
Conversation
crimson11
requested review from
LittleHuba,
bemerybmw,
castler,
hoe-jo and
limdor
as code owners
July 23, 2026 20:12
Currently we determine shm-sizes of the CTRL and DATA shm-objects by a simulation run. I.e. we initialize the content of both section 1st within a heap-allocated resource. At the end we use the sizes to correctly size the shm-objects. This "SIMULATION" method is exact but has high runtime costs and might consume lots of memory during startup. This change now redesigns the containers/dynamic data types being used within the DATA section, to use only classes, which we are in control of and where we exactly know based on our configuration, who much size they will need. Thus the whole simulation canbe skipped and we calculate the size correctly from the configuration settins for the service instance. We re-introduce therefore the ESTIMATION mode in parallel to the SIMULATION mode.
crimson11
force-pushed
the
mf_new_shm_size_calculation
branch
from
July 23, 2026 21:01
c72a678 to
a090932
Compare
crimson11
force-pushed
the
mf_new_shm_size_calculation
branch
from
July 23, 2026 21:24
a090932 to
59cd98d
Compare
castler
reviewed
Jul 24, 2026
| enum class ShmSizeCalculationMode : std::uint8_t | ||
| { | ||
| kSimulation, | ||
| kEstimation, |
Contributor
There was a problem hiding this comment.
This is no longer an estimation - this is now an calculation! We should be clear in the wording.
Added analytical estimate/ANALYSIS mode for the shm-size calculation for the CONTROL section.
crimson11
force-pushed
the
mf_new_shm_size_calculation
branch
from
July 24, 2026 09:46
59cd98d to
e088dba
Compare
Adapted signature of LinearSearchMap to support custom KeqEqual just like std::unordered_map.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently we determine shm-sizes of the
CTRL and DATA shm-objects by a simulation run.
I.e. we initialize the content of both section
1st within a heap-allocated resource. At the end
we use the sizes to correctly size the shm-objects. This "SIMULATION" method is exact but has high runtime costs and might consume lots of memory during startup.
This change now redesigns the containers/dynamic data types being used within the DATA section, to use only classes, which we are in control of and where we exactly know based on our configuration, who much size they will need. Thus the whole simulation canbe skipped and we calculate the size correctly from the configuration settins for the service instance.
We re-introduce therefore the ESTIMATION mode in parallel to the SIMULATION mode.
Tackles issue #761