-
Notifications
You must be signed in to change notification settings - Fork 24
Multicore support for echo server #255
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
base: main
Are you sure you want to change the base?
Conversation
34f6aaf
to
5ecd421
Compare
5ecd421
to
e912784
Compare
e912784
to
47710c8
Compare
47710c8
to
203309d
Compare
203309d
to
e2afb65
Compare
c0aa4ce
to
161eaac
Compare
4e1afc5
to
69045af
Compare
161eaac
to
cc0cd2c
Compare
cc0cd2c
to
ad35a2b
Compare
8ea0ff8
to
9caea02
Compare
f8ab8e9
to
a982ab9
Compare
5ab5ab9
to
576e061
Compare
include/sddf/benchmark/config.h
Outdated
|
||
#define BENCHMARK_MAX_CHILDREN 64 // TODO: Can we have a higher upper bound on this? | ||
#define BENCHMARK_MAX_CORES 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should know that CONFIG_MAX_NUM_NODES
from seL4 generated configuration, why do we need a max of 64?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are right, we do know this, the problem is that this number is used to define the size of arrays in the benchmark configuration structs, which are eventually serialised by the python meta program. To serialise correctly (leave the correct amount of empty array entries), the meta program must know the size of the C array, or CONFIG_MAX_NUM_NODES
. I'm sure there is a way to give the python meta program access to this macro, but I'm not familiar with how to do it gracefully which is why it it's easier to hardcode a large number. If you can think of a graceful way to expose this macro in the meta program, feel free to change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a gen_config.json file in the board directory somewhere which can be imported in python.
It's possible this makes sense to expose from the microkit end of sdfgen.
It's probably a better idea to make this a future issue for sdfgen rather than forcing you to add this.
But a comment would be nice just explaining why.
This would also solve the other review comment too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can add a comment.
Signed-off-by: Courtney Darville <courtneydarville94@outlook.com>
Signed-off-by: Courtney Darville <courtneydarville94@outlook.com>
Not sure if we need to include the license prefix for the |
You just need to add the files to here to get the CI to pass. |
The JSON files are really annoying for the license check since you can't have comments in JSON so you can't put the license headers there. I'll have more of a look into the license checker to see if there's anything smarter we can do to about this, it's really annoying having to add an entry into that file every time we add a new driver. The reason I don't pattern match on all |
This PR adds multicore support to the echo server example.
To build for SMP, first a core configuration file must be created associating a core value to each PD in the system. There are three example core configuration files added by this PR in the
core_config
directory:single_core.json
,two_core.json
andfour_core.json
.single_core.json
sets each PD's core to 0, but will use the SMP microkit board.Once the core configuration
json
has been created, it must be passed tomake
by setting theSMP_CONFIG
flag to its path. If this flag is set,make
will automatically add the_4_cores
suffix toMICROKIT_BOARD
where required. The flag is optional, and if it is not set the non-SMP microkit board will be used.Changes introduced by this PR:
benchmark.c
has been restructured so that it is aware of which core it is running on for better benchmark result output.benchmark
PD signals the benchmark on the next core to propagate thestart
andstop
signals.utilization_socket.c
is now aware of how many cores are being utilised, and tracks the cycle counts for each active core. Thus it now has a variable number of cycle counter memory regions mapped in.meta.py
to enable additionalbenchmark
andidle
PDs to be created depending on the number of active cores. This also requires that a variable number of.elf
and.data
files be created, thus these files are now created and formatted bymeta.py
rather thanecho.mk
.These changes enable the build system to automatically restructure the system file and outputted elfs based on the core configuration file passed, so that no additional code changes are required.
Other changes required for this to be merged:
Note that the struct serialisation performed by
meta.py
assumes the target architecture is 8 byte aligned.