Project:Kernel/Experimental

Information
By introducing feature patches which menu options that are disabled by default to genpatches (the Gentoo kernel patches), we deduplicate the work the *-sources maintainers have to do do as well as make it easier for a large groups of users so they do not manually need to apply the patch anymore and simply just have to enable it. In genpatches, since 3.9.7, BFQ was added to try this out. We have ensured it to be disabled by default, that it did not affect the build for anyone that does not enable it and as a result users have been enabling and using it on their own. Those that didn't want to use it were not affected.

Usage
To make the the experimental patches apply, enable the  USE flag and (re)emerge the kernel package. Run after making sure the  file is present (like a typical upgrade) to configure them. For more information on how a kernel upgrade happens, read this article. Please note that  only applies the patches but does not enable their options; by default, none of the code that gets applied will be build into the kernel. The experimental options will need to be enabled as necessary using a kernel configuration interface (oldconfig, menuconfig, etc.). The goal here is not at all to build everything into the kernel; quite the opposite, system administrators should explicitly decide what is built just like with the rest of the kernel.

Currently this is only supported in the package, but the project members hope to see other source packages to adapt this functionality in the future.

Dealing with patch conflicts (pulled in via user patches)
Those who want to more explicitly control which experimental patches get applied, for example when one of the experimental patches conflict with one a 'custom patch' provided via user patches. Something like the following can be created where variables like K_EXP_GENPATCHES_PULL="yes" K_EXP_GENPATCHES_LIST="" or UNIPATCH_EXCLUDE="" can be leveraged to respectively opt-in and opt-out control which experimental patches get applied. This allows the system administrator to control which patches get applied as necessary. We suggest the second technique which excludes certain patches. Here are two examples:

Please note that above file ignores the USE flag state as it is was meant for ebuild maintainers; since users will only come across patch collisions problems, they will want to opt-out certain patches:

Notice that BFQ is used as a value as example; this will match any patches named *BFQ*, it is matching using wildcards so that way the full patch name (which might change) doesn't have to be specified.

More information on user patches can be found in the /etc/portage/patches article.

Status
This document aims to give an overview of the current status of the experimental patches in the available kernel releases.

From 3.10.11 and 3.11 onward, experimental patches will now be available using an experimental USE flag as explained above; such that they do not longer apply by default.

Overview of experimental patches
Currently we only provide BFQ and a GCC optimizations patch to further revise our tools for providing experimental patches, we plan to add more of the most common patches later.

BFQ
BFQ is a proportional-share disk scheduling algorithm that also supports hierarchical scheduling with a cgroups interface. Here are the main nice features of BFQ:


 * Low latency for interactive applications.
 * Low latency for soft real-time applications.
 * High throughput.
 * Strong fairness guarantees.

The above is quoted from BFQ and related stuff on disk scheduling where more information can be found.

Additional CPU optimizations for GCC
This kernel patch adds additional CPU options to the Linux kernel accessible under:

The above is quoted from graysky2/kernel_gcc_patch README.md where more information can be found.

It is worth noting that these optimizations meet ANOVA assumptions; and thus, small but real speed increases can be experienced.

Gentoo development mailing list

 * Proper distribution integration of kernel *-sources, patches and configuration.
 * PATCH: kernel-2.eclass: Add support for experimental genpatches.