aboutsummaryrefslogtreecommitdiff
path: root/doc/source/user_information/user_reference/runtime_parameters.rst
blob: f1ca0541fc22a6489a600fcbf5be20042ada3923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
.. _runtime-parameters:

Runtime Parameters
------------------

.. contents:: Contents
   :local:

Runtime parameters are options that can be specified to automatically configure
device at runtime. They can be specified at the global level in the agenda or
for individual workloads.

Example
^^^^^^^
Say we want to perform an experiment on an Android big.LITTLE devices to compare
the power consumption between the big and LITTLE clusters running the dhrystone
and benchmarkpi workloads. Assuming we have additional instrumentation active
for this device that can measure the power the device is consuming, to reduce
external factors we want to ensure that the device is in airplane mode turned on
for all our tests and the screen is off only for our dhrystone run. We will then
run 2 :ref:`sections <sections>` will each enable a single cluster on the
device, set the cores to their maximum frequency and disable all available idle
states.

.. code-block:: yaml

        config:
            runtime_parameters:
                  airplane_mode: true
        #..
        workloads:
                - name: dhrystone
                  iterations: 1
                  runtime_parameters:
                        screen_on: false
                - name: benchmarkpi
                  iterations: 1
        sections:
                - id: LITTLES
                  runtime_parameters:
                        num_little_cores: 4
                        little_governor: userspace
                        little_frequency: max
                        little_idle_states: none
                        num_big_cores: 0

                - id: BIGS
                  runtime_parameters:
                        num_big_cores: 4
                        big_governor: userspace
                        big_frequency: max
                        big_idle_states: none
                        num_little_cores: 0


HotPlug
^^^^^^^

Parameters:

:num_cores: An ``int`` that specifies the total number of cpu cores to be online.

:num_<core_name>_cores: An ``int`` that specifies the total number of that particular core
                              to be online, the target will be queried and if the core_names can
                              be determine a parameter for each of the unique core names will be
                              available.

:cpu<core_no>_online: A ``boolean`` that specifies whether that particular cpu, e.g. cpu0 will
                            be online.

If big.LITTLE is detected for the device and additional 2 parameters are available:

:num_big_cores: An ``int`` that specifies the total number of `big` cpu cores to be online.

:num_little_cores: An ``int`` that specifies the total number of `little` cpu cores to be online.



.. Note:: Please note that if the device in question is operating its own dynamic
          hotplugging then WA may be unable to set the CPU state or will be overridden.
          Unfortunately the method of disabling dynamic hot plugging will vary from
          device to device.


CPUFreq
^^^^^^^

:frequency: An ``int`` that can be used to specify a frequency for all cores if there are common frequencies available.

.. Note:: When settings the frequency, if the governor is not set to userspace then WA will attempt to set the maximum
          and minimum frequencies to mimic the desired behaviour.

:max_frequency: An ``int`` that can be used to specify a maximum frequency for all cores if there are common frequencies available.

:min_frequency: An ``int`` that can be used to specify a minimum frequency for all cores if there are common frequencies available.

:governor: A ``string`` that can be used to specify the governor for all cores if there are common governors available.

:governor: A ``string`` that can be used to specify the governor for all cores if there are common governors available.

:governor_tunable: A ``dict`` that can be used to specify governor
                   tunables for all cores, unlike the other common parameters these are not
                   validated at the beginning of the run therefore incorrect values will cause
                   an error during runtime.

:<core_name>_frequency: An ``int`` that can be used to specify a frequency for cores of a particular type e.g. 'A72'.

:<core_name>_max_frequency: An ``int`` that can be used to specify a maximum frequency for cores of a particular type e.g. 'A72'.

:<core_name>_min_frequency: An ``int`` that can be used to specify a minimum frequency for cores of a particular type e.g. 'A72'.

:<core_name>_governor: A ``string`` that can be used to specify the governor for cores of a particular type e.g. 'A72'.

:<core_name>_governor: A ``string`` that can be used to specify the governor for cores of a particular type e.g. 'A72'.

:<core_name>_governor_tunable: A ``dict`` that can be used to specify governor
                         tunables for cores of a particular type e.g. 'A72', these are not
                         validated at the beginning of the run therefore incorrect values will cause
                         an error during runtime.


:cpu<no>_frequency: An ``int`` that can be used to specify a frequency for a particular core e.g. 'cpu0'.

:cpu<no>_max_frequency: An ``int`` that can be used to specify a maximum frequency for a particular core e.g. 'cpu0'.

:cpu<no>_min_frequency: An ``int`` that can be used to specify a minimum frequency for a particular core e.g. 'cpu0'.

:cpu<no>_governor: A ``string`` that can be used to specify the governor for a particular core e.g. 'cpu0'.

:cpu<no>_governor: A ``string`` that can be used to specify the governor for a particular core e.g. 'cpu0'.

:cpu<no>_governor_tunable: A ``dict`` that can be used to specify governor
                         tunables for a particular core e.g. 'cpu0', these are not
                         validated at the beginning of the run therefore incorrect values will cause
                         an error during runtime.


If big.LITTLE is detected for the device an additional set of parameters are available:

:big_frequency: An ``int`` that can be used to specify a frequency for the big cores.

:big_max_frequency: An ``int`` that can be used to specify a maximum frequency for the big cores.

:big_min_frequency: An ``int`` that can be used to specify a minimum frequency for the big cores.

:big_governor: A ``string`` that can be used to specify the governor for the big cores.

:big_governor: A ``string`` that can be used to specify the governor for the big cores.

:big_governor_tunable: A ``dict`` that can be used to specify governor
                         tunables for the big cores, these are not
                         validated at the beginning of the run therefore incorrect values will cause
                         an error during runtime.

:little_frequency: An ``int`` that can be used to specify a frequency for the little cores.

:little_max_frequency: An ``int`` that can be used to specify a maximum frequency for the little cores.

:little_min_frequency: An ``int`` that can be used to specify a minimum frequency for the little cores.

:little_governor: A ``string`` that can be used to specify the governor for the little cores.

:little_governor: A ``string`` that can be used to specify the governor for the little cores.

:little_governor_tunable: A ``dict`` that can be used to specify governor
                         tunables for the little cores, these are not
                         validated at the beginning of the run therefore incorrect values will cause
                         an error during runtime.


CPUIdle
^^^^^^^

:idle_states: A ``string`` or list of strings which can be used to specify what
            idles states should be enabled for all cores if there are common
            idle states available. 'all' and 'none' are also valid entries as a
            shorthand

:<core_name>_idle_states: A ``string`` or list of strings which can be used to
                          specify what idles states should be enabled for cores of a particular type
                          e.g. 'A72'. 'all' and 'none' are also valid entries as a shorthand
:cpu<no>_idle_states: A ``string`` or list of strings which can be used to
                      specify what idles states should be enabled for a particular core e.g.
                      'cpu0'. 'all' and 'none' are also valid entries as a shorthand

If big.LITTLE is detected for the device and additional set of parameters are available:

:big_idle_states: A ``string`` or list of strings which can be used to specify
    what idles states should be enabled for the big cores. 'all' and 'none' are
    also valid entries as a shorthand
:little_idle_states: A ``string`` or list of strings which can be used to
    specify what idles states should be enabled for the little cores. 'all' and
    'none' are also valid entries as a shorthand.


Android Specific Runtime Parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:brightness: An ``int`` between 0 and 255 (inclusive) to specify the brightness
    the screen should be set to. Defaults to ``127``.

:airplane_mode: A ``boolean`` to specify whether airplane mode should be
    enabled for the device.

:rotation: A ``String`` to specify the screen orientation for the device. Valid
    entries are ``NATURAL``, ``LEFT``, ``INVERTED``, ``RIGHT``.

:screen_on: A ``boolean`` to specify whether the devices screen should be
    turned on. Defaults to ``True``.

.. _setting-sysfiles:

Setting Sysfiles
^^^^^^^^^^^^^^^^
In order to perform additional configuration of a target the ``sysfile_values``
runtime parameter can be used. The value for this parameter is a mapping (an
associative array, in YAML) of file paths onto values that should be written
into those files. ``sysfile_values`` is the only runtime parameter that is
available for any (Linux) device. Other runtime parameters will depend on the
specifics of the device used (e.g. its CPU cores configuration) as detailed
above.

.. note:: By default WA will attempt to verify that the any sysfile values were
   written correctly by reading the node back and comparing the two values. If
   you do not wish this check to happen, for example the node you are writing to
   is write only, you can append an ``!`` to the file path to disable this
   verification.

For example the following configuration could be used to enable and verify that cpu0
is online, however will not attempt to check that its governor have been set to
userspace::

                - name: dhrystone
                runtime_params:
                      sysfile_values:
                            /sys/devices/system/cpu/cpu0/online: 1
                            /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor!: userspace