StarlingX Integration and packaging
Go to file
Tao Wang 098692ba0b kubernetes: make isolcpus allocation SMT-aware
Enhance isolcpus support in Kubernetes to allocate isolated SMT
siblings to the same container when SMT/HT is enabled on the host.

As it stands, the device manager code in Kubernetes is not SMT-aware
(since normally it doesn't deal with CPUs).  However, StarlingX
exposes isolated CPUs as devices and if possible we want to allocate
all SMT siblings from a CPU core to the same container in order to
minimize cross- container interference due to resource contention
within the CPU core.

The solution is basically to take the list of isolated CPUs and
re-order it so that the SMT siblings are next to each other.  That
way the existing resource selection code will allocate the siblings
together.  As an optimization, if it is known that an odd number
of isolated CPUs are desired, a singleton SMT sibling will be
inserted into the list to avoid breaking up sibling pairs.

Test Plan:

Tested with AIO-SX HT enabled and disabled (disabled will not
run the code).  Test results below are with HT enabled.

Platform cpu layout:

       Socket 0        Socket 1
       --------        --------
Core 0 [0, 16]         [8, 24]
Core 1 [1, 17]         [9, 25]
Core 2 [2, 18]         [10, 26]
Core 3 [3, 19]         [11, 27]
Core 4 [4, 20]         [12, 28]
Core 5 [5, 21]         [13, 29]
Core 6 [6, 22]         [14, 30]
Core 7 [7, 23]         [15, 31]

isolcpus=2-3,8-9,18-19,24-25
Ct: container
InCt: initcontainer
U: isolcpus
Test command in pod:cat /sys/fs/cgroup/cpuset/cpuset.cpus

Case 1: 1Ct_3U,got [2-3,19],Passed
Case 2: Keep case 1;create 1Ct_2U,got [9,25],Passed
Case 3: Keep case 1,2;create 1Ct_1U got[18],
        create another 1Ct_2U got [8,24],Passed
Case 4: Reboot after case 3;Pods keep cpu as above.Passed
Case 5: Clean All;create 2Ct_3U by one replicaset,pod_1[8-9,24],
        pod_2[3,18-19],Passed
Case 6: Keep case 5;create 1Ct_2U,got [2,25],[2,25] is the last
        two non-siblings isocpus,as expected,Passed
Case 7: Clean All;create 2InCt_1Ct_2U,InCt_1 got[2,18],
        InCt_2 got[2,18],Pod got [2,18],Passed
Case 8: Clean All;create 2InCt_2Ct_2U, Pod1_InCt_1 got[3,19],
        Pod1_InCt_2 got[3,19], Pod1 got [3,19],Pod2_InCt_1 got[2,18],
        Pod2_InCt_2 got[2,18], Pod2 got [2,18],Cpu in initcontainer
        is tested by write file to pvc,Passed

Story: 2008760
Task: 44190

Change-Id: I8bd03352cc395bada9126fb0fce8ed268ac36456
Signed-off-by: Tao Wang <tao.wang@windriver.com>
Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
2022-02-10 14:32:14 -05:00
base Merge "ostree: use tarballs to replace the meta-lat and ostree in manifest" 2022-01-14 17:27:34 +00:00
bmc/Redfishtool Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
ceph/ceph Merge "Enable generation of Ceph's Python 3 packages" 2022-01-21 00:26:05 +00:00
config Fix debian ported patch for puppet-rabbitmq 2021-11-23 19:20:32 +02:00
database Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
devstack Relocated some packages to repo 'utilities' 2019-09-05 20:31:36 -04:00
doc Switch to newer openstackdocstheme and reno versions 2020-06-04 14:28:48 +02:00
docker/python-docker Add debian package for python-docker 2021-10-18 10:59:07 +08:00
filesystem Add debian package for drbd-utils 2021-10-26 11:16:57 +03:00
gpu/gpu-operator integ: gpu-operator chart upgrade 1.6.0 -> 1.8.1 2021-11-23 00:56:53 +00:00
grub debian: Serialize grub build 2022-01-19 08:21:40 -05:00
kubernetes kubernetes: make isolcpus allocation SMT-aware 2022-02-10 14:32:14 -05:00
ldap Merge "Add debian package for ldapscripts" 2021-11-23 18:18:46 +00:00
logging/logrotate/centos Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
networking Merge "net-tools: add debian package" 2021-12-08 12:26:23 +00:00
ostree ostree: use tarballs to replace the meta-lat and ostree in manifest 2022-01-11 16:14:10 +08:00
python Patch watch.py in python-kubernetes package 2021-08-25 17:05:03 -04:00
releasenotes Switch to newer openstackdocstheme and reno versions 2020-06-04 14:28:48 +02:00
requests-toolbelt Add auto-versioning to starlingx/integ packages 2020-06-24 09:48:28 +08:00
security relocate /pxeboot to /var/pxeboot 2021-12-23 14:29:00 -05:00
storage-drivers Upgrade trident spec files for 21.04.1 2021-11-10 18:36:03 +00:00
tools Add libbpf v0.5.0 2021-10-29 17:23:16 -04:00
virt Merge "Add debian package for virt/kvm-timer-advance" 2022-01-22 21:01:36 +00:00
.gitignore Add Docker Registry Token Server 2019-01-08 11:42:04 -05:00
.gitreview OpenDev Migration Patch 2019-04-19 19:52:31 +00:00
.yamllint Add .yamllint file 2021-09-09 19:05:36 +03:00
.zuul.yaml Updating the pylint tox target to reflect its targets 2021-11-04 10:22:24 -05:00
bindep.txt Fix pylint zuul jobs failing due to libvirt-python and pkgconfig 2019-07-04 14:14:39 -05:00
centos_build_layer.cfg Build layering, add layer build config file and srpm and tarball lst 2019-10-21 09:24:22 +08:00
centos_extra_downloads.lst Move mellanox userspace from integ repo 2020-05-06 19:58:38 -04:00
centos_guest_image_rt.inc Subdirectory kernel relocated to new repo starlingx/kernel 2020-04-11 13:08:18 -04:00
centos_guest_image.inc Subdirectory kernel relocated to new repo starlingx/kernel 2020-04-11 13:08:18 -04:00
centos_iso_image.inc Replace K8s 1.21.3 with 1.21.8 2022-01-14 16:57:25 -05:00
centos_pkg_dirs Replace K8s 1.21.3 with 1.21.8 2022-01-14 16:57:25 -05:00
centos_pkg_dirs_installer Config file changes for packages being relocated to repo 'compile' 2019-09-05 20:28:59 -04:00
centos_pkg_dirs_rt Move mellanox userspace from integ repo 2020-05-06 19:58:38 -04:00
centos_srpms_3rdparties.lst networking: Update keepalived from 1.3.5 to 2.1.5 2021-11-12 12:12:16 -05:00
centos_srpms_centos.lst tzdata: upversion to 2021e and start building 2022-01-12 17:32:24 -05:00
centos_stable_docker_images.inc Create Docker image for running Intel N3000 FPGA tools 2020-02-20 19:09:13 -05:00
centos_stable_wheels.inc Add libvirt module to stable wheels for image build 2019-04-04 22:54:04 -04:00
centos_tarball-dl.lst Merge "Enable generation of Ceph's Python 3 packages" 2022-01-21 00:26:05 +00:00
CONTRIBUTORS.wrs StarlingX open source release updates 2018-05-31 07:36:35 -07:00
debian_build_layer.cfg Add debian_build_layer.cfg file 2021-10-05 14:08:19 -04:00
debian_iso_image.inc Add debian_iso_image.inc file 2021-10-27 02:51:46 -04:00
debian_pkg_dirs Replace K8s 1.21.3 with 1.21.8 2022-01-14 16:57:25 -05:00
distroless_stable_docker_images.inc add intel-gpu-plugin docker image to stable docker image build 2019-07-16 09:48:24 +08:00
LICENSE StarlingX open source release updates 2018-05-31 07:36:35 -07:00
pylint.rc Updating the pylint tox target to reflect its targets 2021-11-04 10:22:24 -05:00
README.rst Followup opendev cleanup and test jobs 2019-04-21 09:23:19 -05:00
test-requirements.txt Add default test framework 2018-06-11 13:45:22 -05:00
tox.ini Updating the pylint tox target to reflect its targets 2021-11-04 10:22:24 -05:00

integ

StarlingX Integration