diff --git a/doc/source/specs/stx-9.0/approved/kernel-2011000-uprevision-to-6.6.rst b/doc/source/specs/stx-9.0/approved/kernel-2011000-uprevision-to-6.6.rst new file mode 100644 index 0000000..1355770 --- /dev/null +++ b/doc/source/specs/stx-9.0/approved/kernel-2011000-uprevision-to-6.6.rst @@ -0,0 +1,199 @@ +.. + This work is licensed under a Creative Commons Attribution 3.0 Unported + License. http://creativecommons.org/licenses/by/3.0/legalcode + +========================== +Kernel: uprevision to v6.6 +========================== + +Storyboard: +https://storyboard.openstack.org/#!/story/2011000 + +We need upgrade kernel to keep aligned with linux-yocto upstream, so that +the code improvement in upstream can be available in our kernel. + +Problem description +=================== + +Our kernel version is 5.10 now while the kernel upstream stable release is +6.6. We should upgrade to keep aligned with it. + +Use Cases +--------- + +* 6.6.7 will be the new kernel version. +* Replace out of tree drivers with in tree drivers (TBD). + +Proposed change +=============== + +We will take 2 steps to finish the upgrading: + +* Upgrade kernel to 6.6.7 on bullseye (debian11) based platform + (STX framework/application). +* After the base platform is upgraded to bookworm (debian12), update + the upstream "debian" folder for kernel build to debian12. + The main difference about building kernel for debian11 vs. debian12 + is gcc-10 vs. gcc-12. + +For the 1st stage, the initial "debian" folder is chosen from repo +https://salsa.debian.org/kernel-team/linux/-/tree/master?ref_type=heads +and branch bullseye-backports, whose newest kernel version is 6.1. +Kernel 6.6 can be compiled OK with some changes on it. +For the 2nd stage, the initial "debian" folder will be chosen from +branch bookworm-backports to be matched with bookworm platform. + + +We are suggested to remove OOT drivers if no special customer's request +for drivers. It might be hard to remove all the OOT drivers because +some of them can't be found in kernel. How about we remove some of them +such as i40e/iavf/ice ... which are easy to be replaced by in tree +drivers? Welcome suggestions. + +If out of tree drivers are to be removed, we need switch them to +in tree drivers. This involves: + +* Change kernel configurations. +* Remove the use cases for the removed OOT kernel driver modules. +* Verify the in tree drivers involved on the proper hardwares. + + +Some optimizations for the initial StarlingX debian kernel building framework +will be done in this upgrading: + +* Add packages without abiname for image/headers and remove the kernel + abiname/version from code involved so that we don't need change abiname + everywhere after the kernel major version upgrading. This has been finished + for some time. Please refer to: + https://review.opendev.org/q/topic:%22rm-abiname%22 +* We used to always maintain kernel with patches on "debian" folder + downloaded and they are put at kernel/kernel-std(rt)/debian/deb_patches. + Most of these patches are about "changelog" (debian/changelog) and + "config" (debian/config/amd64/none/config). The patches in "deb_patches" + dir increased rapidly. + Next We will put "changelog" and "config" at the dir + kernel/kernel-std(rt)/debian/source and use them to replace + debian/changelog and debian/config/amd64/none/config + after the upstream "debian" folder is extracted. This can not only + keep a clean "deb_patches" folder, but also avoid using a big patch to + remove the "changelog" file in the upstream "debian" folder before any + kernel build. + +Alternatives +------------ + +We don't upgrade kernel and user space to debian 12 at the same time +because it involves too many changes and will cause a high risk. + +Data model impact +----------------- + +None + +REST API impact +--------------- + +None + +Security impact +--------------- + +None + +Other end user impact +--------------------- + +None + +Performance Impact +------------------ + +After kernel upgrading, performance tests will be done to avoid any +regression, e.g. + +* cyclictest test +* kubernetes network performance test + +Other deployer impact +--------------------- + +Because the kernel upgrading can cause some sys/proc files' change on +target and they are user setting interface, starlingX framework/applications +need some changes to cooperate with that. + +Developer impact +---------------- + +None + +Upgrade impact +-------------- + +None + +Implementation +============== + +Assignee(s) +----------- + +Primary assignee: + li.zhou@windriver.com + +Repos Impacted +-------------- + +* starlingx/kernel +* starlingx/tools +* ... + +Work Items +---------- + +* Upgrade kernel-std to 6.6.7. +* Upgrade kernel-rt to 6.6.7. +* [TBD]Bring up in tree drivers to replace out of tree kernel drivers if possible. +* [TBD]Adapt/upgrade out of tree kernel drivers to work with kernel 6.6. +* Performance tests. +* Some bugs' retests because of great context changes for porting patches + that are used to solve them. + +Dependencies +============ + +None + +Testing +======= + +* Linux kernel is the base of the whole system, so basic sanity/regression + tests are necessary. +* 2 performance tests (cyclictest test and kubernetes network performance + test) are needed to secure that the new kernel's performance is acceptable. + +Documentation Impact +==================== + +The documentation that mentions kernel version is needed to be changed. + +References +========== +New kernel version: + +* https://git.yoctoproject.org/linux-yocto/log/?h=v6.6%2Fstandard%2Fbase&qt=range&q=a7d960cfa075eb93eef1e04e96940a35d1a49d79 +* https://git.yoctoproject.org/linux-yocto/log/?h=v6.6%2Fstandard%2Fpreempt-rt%2Fbase&qt=range&q=0539614ef9daa0949cfe4855234dbe1c9f1da432 + +New upstream "debian" folder repo for building: + +* https://salsa.debian.org/kernel-team/linux/-/tree/master?ref_type=heads + +History +======= + +.. list-table:: Revisions + :header-rows: 1 + + * - Release Name + - Description + * - Stx-9.0 + - Introduced