dlb_taskset

Date:Fri Jul 15 2022

NAME

dlb_tasksetManage CPU affinity of DLB applications. -

SYNOPSIS

dlb_taskset –list[=num_columns] [–pid pid]
dlb_taskset –set cpu_list –pid pid
dlb_taskset –set cpu_list [–borrow] application
dlb_taskset –remove cpu_list [–pid pid]
dlb_taskset –getpid id

DESCRIPTION

The command dlb_taskset can manage the CPU affinity of any DLB running process or new applications. The command can list the existing processes or modify the current CPU affinity.

Note that the utility does not only changes the CPU pinning of each thread but also forces the process to communicate with the underlying programming model runtime to modify the number of running threads.

Possible operations:

-l, –list[=num_columns]
List the CPU affinity of all DLB processes as well as other information about its mask status. The operation accepts an optional parameter num_columns to specify the maximum number of columns to be shown in the output, by default this number depends on the screen width. If –pid pid is provided, show only the current affinity mask of that process.
-s, --set, -c, --cpus cpu_list
 Set a new CPU affinity mask as specified in cpu_list for an existing DLB process or a new one. This operation needs either a –pid pid or an application. If some CPU in the list is previously owned by other DLB process, remove first. See CPU_LIST FORMAT.
-r, --remove cpu_list
 Remove all CPUs specified in cpu_list from any DLB process that currently owns that CPU. If a –pid pid is provided, only act on that process. See CPU_LIST FORMAT.
-g, --getpid id
 Obtain the system Process ID of a given DLB internal id. Note that it is not possible to obtain the DLB internal ID of a process so the usage of this option is discouraged, although it is kept for internal usage.

OPTIONS

-p, --pid pid Act only on the given pid.
-b, --borrow
Only valid when dlb_taskset launches a new application. This flag tells DLB to borrow CPUs instead of stealing them. This means that if any CPU was removed from any other process due to this action and assigned to the new process, that CPU will be returned, if possible, to the original owner when the application ends.
Note: By default, if this option is not selected, CPUs stolen and assigned to new applications will never be returned to their original owners.
–color[=WHEN]
Colorize the output; WHEN can be ‘yes’/’always’ (default if parameter is omitted), ‘auto’ (default if option is omitted), or ‘no’/’never’.
-h, --help Display this help.

CPU_LIST FORMAT

The cpu_list argument can be either a human readable list or range of decimal values, e.g.: ‘0,5-7’, or a hexadecimal or binary mask where the first CPU is the least significant bit, e.g.: ‘0xE1’ or ‘0b11100001’. In all the examples above the argument means CPUs with logical id #0, #5, #6, #7.

AUTHOR

Barcelona Supercomputing Center (pm-tools@bsc.es)

SEE ALSO

dlb(1), dlb_run(1), dlb_shm(1)