From: Heiko Carstens Date: Sat, 17 Jan 2026 14:53:26 +0000 (+0100) Subject: Merge branch 'preempt' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86302ddf20e6b27ef463006c8bde6fd753056101;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'preempt' Heiko Carstens says: ==================== The option to select PREEMPT_NONE will go away for all architectures which support PREEMPT_LAZY [1]. Until now all distributions provide kernels built with PREEMPT_NONE enabled for s390. In particular this means that all preempt_disable() / preempt_enable() pairs are optimized away during compile time. With PREEMPT_LAZY this is not the case. Switching to PREEMPT_LAZY leads to a kernel image size increase of ~218kb (defconfig, gcc15). s390 provides optimized preempt primitives, however there is still room for improvement. Since support for relocatable lowcore was added access to preempt_count in lowcore requires an extra call of get_lowcore(), which generates an extra instruction. Also all instructions have to use a base register which is not zero to access preempt_count. Address this by adding a couple of inline assemblies with alternatives. This generates better code and reduces the size of a PREEMPT_LAZY built kernel image by ~58kb. [1] https://lore.kernel.org/all/20251219101502.GB1132199@noisy.programming.kicks-ass.net/ ==================== Signed-off-by: Heiko Carstens --- 86302ddf20e6b27ef463006c8bde6fd753056101