Skip to content

Conversation

@kakra
Copy link
Owner

@kakra kakra commented Dec 14, 2025

Export patch series: https://github.com/kakra/linux/pull/43.patch

Important: Intel has stopped maintaining these kernel patches, so I will probably drop them if they cause conflicts, or move them to the gaming patchset.

ClearLinux performance patches: a selected set of ClearLinux kernel patches which are supposed to improve performance, gaming experience, or general compatibility with hybrid-core Intel CPUs (e.g. asymmetric CPU cores of 12th gen or later), especially on early mainboards.

Potential Conflicts:

  • Gentoo kernel 6.12.1+ with PDS/BMQ patches (USE="experimental") causes conflicts, use UNIPATCH_EXCLUDE="5020 5021" via package.env to exclude those conflicting patches.

Author:    Arjan van de Ven <arjan@linux.intel.com>

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jos.c.venegas.munoz@intel.com>
Reduce wakeups for PME checks, which are a workaround for miswired
boards (sadly, too many of them) in laptops.

Signed-off-by: Kai Krakow <kai@kaishome.de>
Increase target_residency in cpuidle cstate

Tune intel_idle to be a bit less agressive;
Clear linux is cleaner in hygiene (wakupes) than the average linux,
so we can afford changing these in a way that increases
performance while keeping power efficiency

Signed-off-by: Kai Krakow <kai@kaishome.de>
NO point recalibrating for known-constant tsc ...
saves 200ms+ of boot time.

Signed-off-by: Kai Krakow <kai@kaishome.de>
@kakra
Copy link
Owner Author

kakra commented Dec 14, 2025

Dropped aggressive memory allocation patches due to SLUB allocation errors.

fenrus75 and others added 18 commits December 14, 2025 23:17
…default

Signed-off-by: Kai Krakow <kai@kaishome.de>
As Clear Linux boots fast the device is not ready when
the mounting code is reached, so a retry device scan will
be performed every 0.5 sec for at least 40 sec
and synchronize the async task.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
These settings are needed to prevent networking issues when
the networking modules come up by default without explicit
settings, which breaks some cases.

We don't want the modprobe settings to be read at boot time
if we're not going to do anything else ever.

Signed-off-by: Kai Krakow <kai@kaishome.de>
Signed-off-by: Kai Krakow <kai@kaishome.de>
tweak rwsem owner spinning a bit

Signed-off-by: Kai Krakow <kai@kaishome.de>
Signed-off-by: Kai Krakow <kai@kaishome.de>
Signed-off-by: Kai Krakow <kai@kaishome.de>
On systems with overclocking enabled, CPPC Highest Performance can be
hard coded to 0xff. In this case even if we have cores with different
highest performance, ITMT can't be enabled as the current implementation
depends on CPPC Highest Performance.

On such systems we can use MSR_HWP_CAPABILITIES maximum performance field
when CPPC.Highest Performance is 0xff.

Due to legacy reasons, we can't solely depend on MSR_HWP_CAPABILITIES as
in some older systems CPPC Highest Performance is the only way to identify
different performing cores.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Instead of using jiffies and waiting for jiffies to wrap before
measuring use the higher precision local_time for benchmarking.
Measure 2500 loops, which works out to be accurate enough for
benchmarking the raid algo data rates. Also add division by zero
checking in case timing measurements are bogus.

Speeds up raid benchmarking from 48,000 usecs to 4000 usecs, saving
0.044 seconds on boot.

Signed-off-by: Colin Ian King <colin.king@intel.com>
Printing initcall timings that successfully return after 0 usecs
provides not much useful information and takes a small amount of time
to do so. Disable the initcall timings for these specific cases. On
an Alderlake i9-12900 this reduces kernel boot time by 0.67% (timed
up to the invocation of systemd starting) based on 10 boot measurements.

Signed-off-by: Colin Ian King <colin.king@intel.com>
Author: Intel ClearLinux <unknown>

Place libraries right below the binary for PIE binaries, this helps code locality
(and thus performance).

Signed-off-by: Kai Krakow <kai@kaishome.de>
Some misguided apps hammer sched_yield() in a tight loop (they should be using futexes instead)
which causes massive lock contention even if there is little work to do or to yield to.
rare limit yielding since the base scheduler does a pretty good job already about just
running the right things

Signed-off-by: Colin Ian King <colin.i.king@intel.com>
Author: Intel ClearLinux <unknown>
Signed-off-by: Kai Krakow <kai@kaishome.de>
Author: Intel ClearLinux <unknown>
Signed-off-by: Kai Krakow <kai@kaishome.de>
Author: Intel ClearLinux <unknown>
Signed-off-by: Kai Krakow <kai@kaishome.de>
Signed-off-by: Colin Ian King <colin.i.king@intel.com>
scale these by a factor of 4 to improve socket performance

Signed-off-by: Colin Ian King <colin.i.king@intel.com>
Currently the out of bounds check for the length is very unlikely
to be false for valid name strings. Analysis with gcov coverage show
this to be so.

Add an unlikely hint on the error return path check. This improves
performance when testing with single instance stress-ng dentry and
dirent stressors. Tested with a 6.15 kernel, built with gcc 14.2.0
on a Debian Ultra 9 285K system with turbo disabled to reduce test
jitter on tmpfs. Each test case was run 25 times and the % standard
deviation was less than 0.4%. Geometric mean of 25 results show the
following stress-ng bogo-ops performance improvments:

getdent: 1.1%
dentry:  0.9%

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
@kakra kakra force-pushed the rebase-6.18/cltweaks branch from 090b50c to 9ee58f9 Compare December 14, 2025 22:53
@kakra
Copy link
Owner Author

kakra commented Dec 14, 2025

Dropped "Initialize ATA before graphics" and "ahci: Disable staggered spinup by default" in favor of the corresponding ZEN patches in the gaming patchset: ClearLinux kernel is unmaintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants