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 CD2501F30BB for ; Mon, 3 Aug 2026 19:17:46 +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=1785784669; cv=none; b=gwOqTs8BI245v3HgkZXR4ePwfDzeUdhxmf/836QXzHEkBbwxYNQU2yYibxMEaHQwMpXjQ49ISKOgCC5LuOIV1logvEn+6sErOrExuDKRvJY2FTneLwAfjpKnYFW8uYIJbCnMbDkWWmx/04D9TrpU1hY9M/uul5rglEYPPuSMId4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785784669; c=relaxed/simple; bh=/HdxIRJpF1LN+HoPZRpYuT4jED+k8IJUvxOh/dEa7lI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=pg4yzw4CU0Usl8RvHMdqWYc3klVbi8OW01PSyJZcl/ZVCRBTPOCtt5TEIAVJ7VPDNvm597X6HF7W9AcWYOJPwrddB8qSo5HOQg0o5LgjPSJ33LA0VW+IRWBpxgSUMWxwGltj5ZhyiuaBggt0e1IavAhO7bCfJFjtle3wF/cGdx0= 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=phKSWgE4; 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="phKSWgE4" 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 A57D7143D; Mon, 3 Aug 2026 12:17:41 -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 B4A813F632; Mon, 3 Aug 2026 12:17:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1785784665; bh=/HdxIRJpF1LN+HoPZRpYuT4jED+k8IJUvxOh/dEa7lI=; h=From:To:Cc:Subject:Date:From; b=phKSWgE4UiDRxNwlvnEknovfVIga9h6PGmgEoLgHhuvNPtj0xC0UNgzvVUAyDdUTq rqkTUU717qVuOb+6/8MX5bX4qCulE+GbGavmVun+rEhHsf0k1GUja9r+0r51NlM5qO hSWiLFI1rUMhp0pFnITWkqQAV17Gfbl92lu2PJqg= From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: frederic@kernel.org, jstultz@google.com, juri.lelli@redhat.com, mark.rutland@arm.com, meted@linux.ibm.com, mingo@redhat.com, peterz@infradead.org, ruanjinjie@huawei.com, sshegde@linux.ibm.com, tglx@linutronix.de, vincent.guittot@linaro.org, vschneid@redhat.com Subject: [PATCH v2 0/6] sched: dynamic: Simplify PREEMPT_DYNAMIC Date: Mon, 3 Aug 2026 20:17:25 +0100 Message-Id: <20260803191731.3244294-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 redundant code. Since v1, I've had to rebase atop v7.2-rc4 to avoid a conflict with commit: a2c02aa0c6ca ("powerpc: Remove dead non-preemption code") Given this is now late in the cycle, and given the tip:sched/core branch is based on v7.2-rc1, I suspect tip folk might not want to queue this now. Please let me know what you'd prefer; I'm happy to rebase and resend after v7.3-rc1. Since v1: * Rebase to v7.2-rc4 * Apply Revied-by tags. * Fix typos in commit messages. * Add patch to cleanup accessors (per Shrikanth's comment) Mark. Mark Rutland (6): 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} sched: dynamic: Simplify preempt model accessors arch/Kconfig | 38 ------- arch/arm64/Kconfig | 1 - arch/arm64/include/asm/preempt.h | 10 -- arch/loongarch/Kconfig | 1 - arch/powerpc/Kconfig | 1 - 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/preempt.h | 20 ++-- include/linux/sched.h | 31 +----- kernel/Kconfig.preempt | 9 +- kernel/entry/common.c | 17 +-- kernel/sched/core.c | 180 +------------------------------ 18 files changed, 23 insertions(+), 374 deletions(-) -- 2.30.2