Description
High-performance Computing Kit (HCK) is a software base of HPC applications. It provides an isolated and low-overhead running environment for HPC applications by customizing system calls and optimizing scheduling on the Linux platform. In addition, HCK is compatible with the Linux ecosystem to improve HPC application performance. To use HCK, enable the CONFIG_PURPOSE_BUILT_KERNEL option when building the kernel. With HCK, during system startup, some CPUs are isolated to run HPC applications while the non-isolated CPUs run kernel-mode and other user-mode processes.
Usage Instructions
If the kernel supports the HCK feature, add the pbk_cpus parameter to the kernel boot options to specify the reserved CPU resources. By default, the CPU resources are not reserved. You can set this parameter by modifying the GRUB configuration file grub.cfg or on the GRUB boot page.
The format of the boot parameter is pbk_cpus=
launcher
HCK provides a user-mode tool launcher, which can be used to specify a program to run on a specific isolated core. launcher needs to be installed separately.
Basic Options
For details, run launcher -?.
Usage: launcher [OPTION...]
launcher: launch process to pbk domain
EXAMPLES:
launcher -c 1,2 prog # alloc CPU 1,2 from pbk root domain to run prog
launcher -n 2 prog # alloc 2 CPUs from pbk root domain to run prog
launcher -v prog # prog will only touch pbk
launcher -c 1 prog # alloc CPU 1 and 1M memory
-c, --cpulist=CPULIST cpulist to run prog
-n, --nr_cpu=NR_CPU nr_cpus to run prog
-v, --pbk_view run prog with pbk view
-?, --help Give this help list
--usage Give a short usage message
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
Option Description
launcher -?
Displays the usage description of the command.
launcher -c
Specify cpulist to run a program. For example:
launcher -c 1,2 ./test
launcher applies for CPUs 1 and 2 to execute the test program. If CPU 1 or CPU 2 are not isolated or has been applied for by other programs, a failure message is returned.
An exception is as follows:
launcher -c 1,2 ./test1
launcher -c 1,2 ./test2
The same cpulist is specified to execute test2. In this case, no failure message is returned. Instead, test2 is also executed on CPUs 1 and 2.
launcher -n
Specifies the number of CPUs to run a program:
launcher -n 1 ./test
launcher applies for a CPU from the isolated CPUs to run test. If the remaining isolated CPUs are insufficient, a failure message is returned.
launcher -v
After CPUs are isolated, CPU resources are divided into Linux resources and isolated CPU resources. To support programs that can identify and allocate resources, such as mpirun, launcher supports resource perspective modification. For example:
launcher -v cat /proc/cpuinfo
In this case, only isolated CPUs are displayed.
This option can also be used together with the -n and -c options. For example:
launcher -c 1,2 -v cat /proc/cpuinfo
In this case, only information about CPU 1 and CPU 2 is displayed.
The affected procfs and sysfs interfaces are as follows:
procfs:
/proc/cpuinfo
sysfs:
/sys/devices/system/cpu/online
/sys/devices/system/cpu/present
/sys/devices/system/cpu/possible
/sys/devices/system/cpu/cpu<N>/online
/sys/devices/system/node/node<N>/cpumap
/sys/devices/system/node/node<N>/cpulist
/sys/fs/cgroup/cpuset/cpuset.cpus
/sys/fs/cgroup/cpuset/cpuset.effective_cpus
Note: By default, only Linux resources are displayed for the two interfaces related to cgroup (because isolated CPUs are not added to cpuset of cgroup). Other interfaces display Linux resources and isolated CPU resources by default and are not affected by isolation.




