You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce cpuAffinity process property instead of execCPUAffinity
This change introduces more generic `cpuAffinity` property of `Process`
to specify desired CPU affinities while performing operations on create,
start and exec operations.
Signed-off-by: Alexander Kanevskiy <[email protected]>
Copy file name to clipboardExpand all lines: config.md
+24-4Lines changed: 24 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -340,18 +340,35 @@ For Linux-based systems, the `process` object supports the following process-spe
340
340
341
341
***`class`** (string, REQUIRED) specifies the I/O scheduling class. Possible values are `IOPRIO_CLASS_RT`, `IOPRIO_CLASS_BE`, and `IOPRIO_CLASS_IDLE`.
342
342
***`priority`** (int, REQUIRED) specifies the priority level within the class. The value should be an integer ranging from 0 (highest) to 7 (lowest).
343
-
***`execCPUAffinity`** (object, OPTIONAL) specifies CPU affinity used to execute the process.
343
+
***`cpuAffinity`** (object, OPTIONAL) specifies CPU affinity used to execute processes in the runtime and the container.
344
+
All the properties in this setting expects as argument a string that contain a comma-separated list, with dashes to represent ranges.
345
+
For example, `0-3,7` represents CPUs 0,1,2,3, and 7. Special value `all` can be used to reset CPU affinity to the value that includes all possible CPUs in the system.
346
+
If omitted or empty for particular [lifecycle](runtime.md#lifecycle) stage, the runtime SHOULD NOT change process' CPU affinity, and the actual affinity is determined by the Linux kernel.
347
+
The following properties are available:
348
+
***`createRuntime`** (string, OPTIONAL) is a list of CPUs the runtime parent process should run on during the runtime creation stage, before entering the container's namespaces or cgroups.
349
+
CPU affinity should be applied on early stages of container creation, so that any potential CPU consuming operations inside runtime (e.g. [`createRuntime` hooks](#createRuntime-hooks)) will be run on the specified list of CPUs.
350
+
***`createContainer`** (string, OPTIONAL) is a list of CPUs the process should run on during the container creation stage, after entering the container's namespaces but before the user process or any of [`createContainer` hooks](#createContainer-hooks) are executed.
351
+
***`startContainer`** (string, OPTIONAL) is a list of CPUs the process should be run on during the container start stage, inside the container's namespace during `start` operation. The affinity should be applied before executing [`startContainer` hooks](#startContainer-hooks).
352
+
***`execRuntime`** (string, OPTIONAL) is a list of CPUs the runtime parent process to be run during `exec` operation, before the transition to container's cgroup.
353
+
***`execContainer`** (string, OPTIONAL) is a list of CPUs the process will be run on during `exec` operationon after the transition to container's cgroup.
354
+
***`execCPUAffinity`** (object, OPTIONAL, **DEPRECATED**) specifies CPU affinity used to execute the process.
355
+
356
+
Note: `execCPUAffinity` is deprecated in favor of `cpuAffinity`. If `cpuAffinity` is specified and supported by the runtime, the content of `execCPUAffinity` should be ignored.
357
+
344
358
This setting is not applicable to the container's init process.
345
359
The following properties are available:
346
360
***`initial`** (string, OPTIONAL) is a list of CPUs a runtime parent
347
361
process to be run on initially, before the transition to container's
348
362
cgroup. This is a a comma-separated list, with dashes to represent
349
363
ranges. For example, `0-3,7` represents CPUs 0,1,2,3, and 7.
364
+
Deprecated in favor of `execRuntime` in `cpuAffinity`.
350
365
***`final`** (string, OPTIONAL) is a list of CPUs the process will be run
351
366
on after the transition to container's cgroup. The format is the same as
352
367
for `initial`. If omitted or empty, runtime SHOULD NOT change process'
353
368
CPU affinity after the process is moved to container's cgroup, and the
354
369
final affinity is determined by the Linux kernel.
370
+
Deprecated in favor of `execContainer` in `cpuAffinity`.
371
+
355
372
356
373
### <aname="configZOSProcess" />z/OS Process
357
374
@@ -435,9 +452,12 @@ _Note: symbolic name for uid and gid, such as uname and gname respectively, are
0 commit comments