From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B38053C13EF for ; Fri, 3 Jul 2026 13:34:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783085648; cv=none; b=cb8HWyChAAXGS8fbzwjSYu1OYCoFIWddg8rz5850qHZJJMdOiI+feO7WaYMtxgOiO1CfqAm1uSRVH7vj2oMojs0k8BzxEYUTsFu4EUszkqjoSZBRgkU7jydDOb2qTa+8f8ugNi+YINxi4i4D/1gyLt3s+ImQ2gNKNHequF92S90= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783085648; c=relaxed/simple; bh=xmFsIM3k4YkRSTFjb+ibV5DOcwue39G9kmyQU2cGq8Q=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=k1SdsJQDqkw857XkAYTOmwveQgBZ5zaPd5fxI1altS/jPZyGFNr2tV+NquLVIId6JV5V14TtpAONS1pMlkUXUrB8ct0xKT23YjwN07bYfjwSlxCLZ7QgKii9wyi+hb83HCPEKgwBC6Kpv6iXeM+MBedgCOpTiKY46BLoieGTbaU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=r4M4S0zP; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="r4M4S0zP" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BA07E1D13; Fri, 3 Jul 2026 06:34:02 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 985D73F85F; Fri, 3 Jul 2026 06:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1783085647; bh=xmFsIM3k4YkRSTFjb+ibV5DOcwue39G9kmyQU2cGq8Q=; h=From:To:Cc:Subject:Date:From; b=r4M4S0zPV1SfuA2VXA48YK4pq9pHPvhqISTdUc7OyxuRDREUzSE4glqb/8aUKF+a+ Jn4oterIy0EewM3PjFjRTZrpDhRSVtozPN/4vErMjDQ+kWgDvV7gnu9U0QXmc6KP1d 1/ZKYAQmeCpurx3+r7o7PsxtRtRvqgQRvvf8DGhE= From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: frederic@kernel.org, jstultz@google.com, juri.lelli@redhat.com, mark.rutland@arm.com, mingo@redhat.com, peterz@infradead.org, tglx@linutronix.de, vincent.guittot@linaro.org, vschneid@redhat.com Subject: [PATCH 0/5] sched: dynamic: Simplify PREEMPT_DYNAMIC Date: Fri, 3 Jul 2026 14:33:53 +0100 Message-Id: <20260703133358.698078-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit All architectures which currently suppoort PREEMPT_DYNAMIC select ARCH_HAS_PREEMPT_LAZY. On architectures which select ARCH_HAS_PREEMPT_LAZY, it has not been possible to select the NONE and VOLUNTARY preemption models since v7.0 due to commit: 7dadeaa6e851 ("sched: Further restrict the preemption modes") Hence in practice PREEMPT_DYNAMIC no longer supports the NONE or VOLUNTARY preemption models. This series makes the de-facto situation official by making PREEMPT_DYNAMIC depend on ARCH_HAS_PREEMPT_LAZY, and removing all the redundant code. For x86_64 v7.2-rc1 defconfig built with GCC 10.2.1, this makes the bzImage 28K smaller, mostly due to removing NOPs that will never be patched to {cond,might}_resched() at runtime: [mark@lakrids:~/src/linux]% ls -al vmlinux-* -rwxr-xr-x 1 mark mark 53844952 Jul 3 14:09 vmlinux-after -rwxr-xr-x 1 mark mark 53842856 Jul 3 14:09 vmlinux-before [mark@lakrids:~/src/linux]% ls -al bzImage-* -rw-r--r-- 1 mark mark 14771200 Jul 3 14:09 bzImage-after -rw-r--r-- 1 mark mark 14799872 Jul 3 14:08 bzImage-before Mark. Mark Rutland (5): sched: dynamic: Make PREEMPT_DYNAMIC depend on ARCH_HAS_PREEMPT_LAZY sched: dynamic: Simplify {cond,might}_resched() sched: dynamic: Simplify preempt_schedule{,_notrace}() sched: dynamic: Simplify irqentry_exit_cond_resched() sched: dynamic: Remove HAVE_PREEMPT_DYNAMIC_{CALL,KEY} arch/Kconfig | 38 ------- arch/arm64/Kconfig | 1 - arch/arm64/include/asm/preempt.h | 10 -- arch/loongarch/Kconfig | 1 - arch/powerpc/Kconfig | 1 - arch/powerpc/include/asm/preempt.h | 7 -- arch/riscv/Kconfig | 1 - arch/s390/Kconfig | 1 - arch/s390/include/asm/preempt.h | 11 -- arch/x86/Kconfig | 1 - arch/x86/include/asm/preempt.h | 28 ----- include/asm-generic/preempt.h | 10 -- include/linux/irq-entry-common.h | 17 +-- include/linux/kernel.h | 20 ---- include/linux/sched.h | 31 +---- kernel/Kconfig.preempt | 9 +- kernel/entry/common.c | 17 +-- kernel/sched/core.c | 176 +---------------------------- 18 files changed, 13 insertions(+), 367 deletions(-) -- 2.30.2