From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout04.his.huawei.com (canpmsgout04.his.huawei.com [113.46.200.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2F0827A10F for ; Fri, 7 Aug 2026 03:11:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.219 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786072271; cv=none; b=pdwEc1BHASNmijVI5gDmCKJyMgcHCdS6yvGo0GYmlNweSf0cH0K4jfXQ1zEr9KDtGJHi6J0qn4OthzvUb5kN1bJ6XREe9rjXnx42L1PrgPOdKyYAON7AHTqIoCF+B3Xddh3Y0l0N3+toua9vo/39dEDd4GZZ08IiK+mLrroTulw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786072271; c=relaxed/simple; bh=ssD78Ofa4ifTAOLV9H9Z45+B4K09LVNkeUx10nLzeU4=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=JlErl6l7New/msMykdEDhHLmu2vxBTJg4uE9Vf60FTVXiupFG+nJH+KTXOLKNd2NriWK6wEQb8afXeaLStE9dZHABwUl7ok92bBQF/GyI8ez5vHHLlca0Ds8E0G9uc0NCfw0u65a7yOhFE5utx2Yvx3TRtD7QKCjBYweeKgFGl4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=6SiaOn/n; arc=none smtp.client-ip=113.46.200.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="6SiaOn/n" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=bXRUou6ogxdzRSSaqfmcep1be+MxZ/tI7s//I/djzUU=; b=6SiaOn/n86qgGelVMqY5iH7r7J/odUIW0CFOiczGj7tJ7b14ZwGyhbc3NNNtowbZM4xxkvGQz 2F2RbGfYdHNeV5xtXTan89Eoqn7M0FLCxyfUQA9wH9SgJiaV+6itdRS50sQ9xpNSdLkdUR1Ajdq spNt+9GQPZpysxEXR8sG2LU= Received: from mail.maildlp.com (unknown [172.19.163.0]) by canpmsgout04.his.huawei.com (SkyGuard) with ESMTPS id 4hGTST3fnCz1prKd; Fri, 7 Aug 2026 11:01:29 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id CCE1940537; Fri, 7 Aug 2026 11:11:03 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by dggpemf500011.china.huawei.com (7.185.36.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Fri, 7 Aug 2026 11:11:03 +0800 Message-ID: Date: Fri, 7 Aug 2026 11:11:02 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/6] sched: dynamic: Simplify PREEMPT_DYNAMIC To: Mark Rutland , CC: , , , , , , , , , References: <20260803191731.3244294-1-mark.rutland@arm.com> From: Jinjie Ruan In-Reply-To: <20260803191731.3244294-1-mark.rutland@arm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To dggpemf500011.china.huawei.com (7.185.36.131) 在 2026/8/4 3:17, Mark Rutland 写道: > 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() Hi Mark, We also need to update the Doc. --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -5410,8 +5410,6 @@ Kernel parameters preempt= [KNL] Select preemption mode if you have CONFIG_PREEMPT_DYNAMIC - none - Limited to cond_resched() calls - voluntary - Limited to cond_resched() and might_sleep() calls full - Any section that isn't explicitly preempt disabled can be preempted anytime. Tasks will also yield contended spinlocks (if the critical section isn't Best regards, Jinjie > 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(-) >