diff options
| author | Juraj Linkeš <[email protected]> | 2023-03-03 11:25:02 +0100 |
|---|---|---|
| committer | Thomas Monjalon <[email protected]> | 2023-03-19 16:28:32 +0100 |
| commit | b76d80a4dbb900ac50a8ab3a0cae9996bcd9b8d0 (patch) | |
| tree | 88c951b3d245466a5f70503aa63c322e3baa8d80 /dts/framework/testbed_model/node.py | |
| parent | c020b7ce84727c9d6b31932338c08d102296ca99 (diff) | |
dts: add node memory setup
Setup hugepages on nodes. This is useful not only on SUT nodes, but
also on TG nodes which use TGs that utilize hugepages.
The setup is opt-in, i.e. users need to supply hugepage configuration to
instruct DTS to configure them. It not configured, hugepage
configuration will be skipped. This is helpful if users don't want DTS
to tamper with hugepages on their system.
Signed-off-by: Juraj Linkeš <[email protected]>
Tested-by: Bruce Richardson <[email protected]>
Tested-by: Chenyu Huang <[email protected]>
Tested-by: Patrick Robb <[email protected]>
Diffstat (limited to 'dts/framework/testbed_model/node.py')
| -rw-r--r-- | dts/framework/testbed_model/node.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_model/node.py index f63b755801..d48fafe65d 100644 --- a/dts/framework/testbed_model/node.py +++ b/dts/framework/testbed_model/node.py @@ -62,6 +62,7 @@ class Node(object): Perform the execution setup that will be done for each execution this node is part of. """ + self._setup_hugepages() self._set_up_execution(execution_config) def _set_up_execution(self, execution_config: ExecutionConfiguration) -> None: @@ -154,6 +155,17 @@ class Node(object): self._logger.info("Getting CPU information.") self.lcores = self.main_session.get_remote_cpus(self.config.use_first_core) + def _setup_hugepages(self): + """ + Setup hugepages on the Node. Different architectures can supply different + amounts of memory for hugepages and numa-based hugepage allocation may need + to be considered. + """ + if self.config.hugepages: + self.main_session.setup_hugepages( + self.config.hugepages.amount, self.config.hugepages.force_first_numa + ) + def close(self) -> None: """ Close all connections and free other resources. |
