Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message and sequence size limited to 4 KiB in protocol sessions #713

Closed
4 tasks done
treiher opened this issue Jul 27, 2021 · 10 comments
Closed
4 tasks done

Message and sequence size limited to 4 KiB in protocol sessions #713

treiher opened this issue Jul 27, 2021 · 10 comments
Assignees

Comments

@treiher
Copy link
Collaborator

treiher commented Jul 27, 2021

For each message or sequence variable in a session specification, 4 KiB are allocated, independent of the actual type. Larger messages or sequences are not yet supported.


Tasks

  • Enable configuration of buffer sizes using integration file
  • Add inference of buffer size for statement-local buffers
  • Enable use of separate directory for integration files
  • Add documentation
@treiher
Copy link
Collaborator Author

treiher commented Aug 12, 2021

The buffer sizes of message and sequence variables could be made generic parameters of the generated session package. To avoid too many parameters during instantiation, a default value could be predefined. The default value could be settable in the RecordFlux CLI. Custom buffer sizes should be considered in the design of the memory allocator in #629.

@senier senier moved this from To do to In progress in RecordFlux 0.6 Aug 25, 2021
@senier senier moved this from In progress to To do in RecordFlux 0.6 Aug 25, 2021
@senier senier moved this from To do to In progress in RecordFlux 0.6 Aug 25, 2021
@senier senier moved this from In progress to Under review in RecordFlux 0.6 Oct 14, 2021
@senier senier linked a pull request Oct 14, 2021 that will close this issue
@treiher treiher removed a link to a pull request Oct 15, 2021
@treiher treiher moved this from Under review to In progress in RecordFlux 0.6 Oct 15, 2021
@senier senier moved this from In progress to To do in RecordFlux 0.6 Oct 18, 2021
@treiher
Copy link
Collaborator Author

treiher commented Oct 18, 2021

Copy of the proposal discussed in #629:

Configuration

Regarding the configuration of memory sizes, we decided to separate those integration aspects into an independent file. For every specification there can be an .rfi (RecordFlux Integration) file which (for now) defines the minimum sizes of all memory regions. For easy human and machine readability we settled on YAML as the format. As there may be multiple such sets of files (e.g. for different system architectures), we'll add a switch to rflx to specify a search path.

The file format looks like this:

Buffer_Size:
    Default: <default_minimum_size>
    Global:
        Global_Variable_1_Name: <minimum_size>
        ...
        Glocal_Variable_n_Name: <minimum_size>
    Local:
        State_1:
            Local_Variable_1_Name: <minimum_size>
            ...
            Local_Variable_n_Name: <minimum_size>
        ...
        State_m:
            Local_Variable_1_Name: <minimum_size>
            ...
            Local_Variable_n_Name: <minimum_size>

The default size is used for all memory regions for which no explicit size is specified.

Calculation

Calculation of the required buffer sizes should be simple. The number of required buffers obviously is the maximum number of local variables used in any state. For every state we sort the required variable sizes in descending order and extend the resulting list to have the maximum length (by adding 0 size values). To calculate the required slot sizes, we simply take the maximum value for every position in every list across all states. The allocation for a local variable in a state simply is the position in the (state-specific) list referring to that local variable.

@kanigsson kanigsson moved this from To do to In progress in RecordFlux 0.6 Oct 25, 2021
@kanigsson
Copy link
Collaborator

Are multiple sessions in a single .rflx file supported? If yes, we need to specify the session name in the corresponding .rfi file.

@treiher
Copy link
Collaborator Author

treiher commented Nov 2, 2021

Yes, you are right. A specification file can contain multiple sessions, and we need to differentiate them in the .rfi file. We could adapt the proposed file format as follows:

Session_1_Name:
    Buffer_Size:
        Default: <default_minimum_size>
        Global:
            Global_Variable_1_Name: <minimum_size>
            ...
Session_2_Name:
    Buffer_Size:
        Default: <default_minimum_size>
        Global:
            Global_Variable_1_Name: <minimum_size>
            ...

@kanigsson
Copy link
Collaborator

Do we want to keep the file open for other uses, including not related to sessions? In that case, it could be better to have a top-level entry for the Buffer_Size stuff, something like that maybe:

Buffer_Size:
    Session_1_Name:
        Default: <default_minimum_size>
        Global:
            Global_Variable_1_Name: <minimum_size>
            ...
    Session_2_Name:
        Default: <default_minimum_size>
        Global:
            Global_Variable_1_Name: <minimum_size>
            ...

Another question: Do we want to allow default values per state, or globally per session only?

@treiher
Copy link
Collaborator Author

treiher commented Nov 2, 2021

You are right, we should keep the file format extendable. I have discussed that with @senier, and we came up with the following format:

Session:
    Session_1_Name:
        Buffer_Size:
            Default: <default_minimum_size>
            Global:
                Global_Variable_1_Name: <minimum_size>
                ...
    Session_2_Name:
        Buffer_Size:
            Default: <default_minimum_size>
            Global:
                Global_Variable_1_Name: <minimum_size>
                ...

This format also makes it easier to add further configuration options to a session which are not related to buffer sizes.

kanigsson added a commit that referenced this issue Nov 8, 2021
@kanigsson kanigsson moved this from In progress to Under review in RecordFlux 0.6 Nov 8, 2021
@kanigsson kanigsson moved this from Under review to In progress in RecordFlux 0.6 Nov 10, 2021
kanigsson added a commit that referenced this issue Nov 15, 2021
kanigsson added a commit that referenced this issue Nov 17, 2021
@kanigsson kanigsson moved this from Implementation to Review in RecordFlux 0.6 Nov 22, 2021
@kanigsson
Copy link
Collaborator

kanigsson commented Nov 23, 2021

I can't add tasks to this issue given that the first post was by Tobias. Tobias, can you please add the item "Documentation" to the task list?

@treiher
Copy link
Collaborator Author

treiher commented Nov 23, 2021

Sure, I have added it.

kanigsson added a commit that referenced this issue Nov 26, 2021
kanigsson added a commit that referenced this issue Dec 6, 2021
RecordFlux 0.6 automation moved this from Review to Done Dec 6, 2021
@treiher treiher reopened this Dec 6, 2021
RecordFlux 0.6 automation moved this from Done to Implementation Dec 6, 2021
kanigsson added a commit that referenced this issue Dec 8, 2021
- command line option for rfi files
- new argument of Parser and Integration for rfi files location
- move all rfi file handling to Integration class
- move testing accordingly
- new test for different location of rfi file

For #713
kanigsson added a commit that referenced this issue Dec 8, 2021
- command line option for rfi files
- new argument of Parser and Integration for rfi files location
- move all rfi file handling to Integration class
- move testing accordingly
- new test for different location of rfi file

For #713
kanigsson added a commit that referenced this issue Dec 9, 2021
- command line option for rfi files
- new argument of Parser and Integration for rfi files location
- move all rfi file handling to Integration class
- move testing accordingly
- new test for different location of rfi file

For #713
@kanigsson
Copy link
Collaborator

I think this can be closed now. Any other items that anybody can think of?

@treiher
Copy link
Collaborator Author

treiher commented Dec 13, 2021

As all tasks are completed and merged, this issue can be closed.

@treiher treiher closed this as completed Dec 13, 2021
RecordFlux 0.6 automation moved this from Implementation to Done Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants