From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C441C3DA4A for ; Fri, 2 Aug 2024 11:45:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6mhOjOjaHVces5fHVVmQVHl9XJCI2jfaqtHAFlR8yIc=; b=r+qoYRmPBuhwR8txynaOBU2ksi L1ZK3lxGe0pq3VeKi2wjbBYye/rpTUy+IyGqEezQf29juOrVyUpM7uJhzQ0xnaY9JxoycqVvrt/io v0qewZpC1YO2FNDJZHV7/pvFbdQsVBhTg0dtjcual0OhfPxONn9cMQ/4iy8R2rryucRuw8ZhHftv3 94Hwz3drK9XFd4Kt/9v+2V1OuiwR/AgRYxGFCH0ihUg1V2SfbXwVEjycJhi0B01uD+N15+Klng27d m6hhsYg4Fg90KY6jCRCle1m7YCgN2szRjW9upyj7YvfgpxthUbDxsQb45iyBXB1f0tiAOZR1dS3rL lAZ6rdGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZqj5-00000008iZR-0bo5; Fri, 02 Aug 2024 11:45:39 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZqiZ-00000008iRP-3M5f for linux-arm-kernel@lists.infradead.org; Fri, 02 Aug 2024 11:45:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6mhOjOjaHVces5fHVVmQVHl9XJCI2jfaqtHAFlR8yIc=; b=mmaz96gQjgt4RR9Gs5n26LcEdk m19xphe1TyPnefPjsyKwS0f6bfdpEPs6jqp7sOAvCtqHqSV/bQoLcSsEyZL29qh4DM+hTqOd7Yvuy pe0CpGLAN/YCsYuz70vNDDGDiHodmG+UJumpa/cWMa7J7yvkV41MkiEkeGfOJyCrUhpWRgnHpxxdS yFgQfWPS4X5+fV7UFE/7jWJ1vKfu3iRib8yqewIk1R00U2PuoSCTltH4eXrPltv2u7wQ3NW4tyTEs 8wHbDYKfmgxw4JqCt/HPzaojgVHu/rN2S3cBdKnqDFADQd6m83JnmMS4kObPerDlyqUjGuopWMUwq sGxJdAtg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:53900) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sZqiB-0006c6-0V; Fri, 02 Aug 2024 12:44:43 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sZqi7-00080g-Qb; Fri, 02 Aug 2024 12:44:39 +0100 Date: Fri, 2 Aug 2024 12:44:39 +0100 From: "Russell King (Oracle)" To: Jinjie Ruan Cc: arnd@arndb.de, afd@ti.com, akpm@linux-foundation.org, linus.walleij@linaro.org, eric.devolder@oracle.com, robh@kernel.org, vincent.whitchurch@axis.com, bhe@redhat.com, nico@fluxnic.net, ardb@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH] ARM: support PREEMPT_DYNAMIC Message-ID: References: <20240620090028.729373-1-ruanjinjie@huawei.com> <79a3de7c-21da-12ce-8372-9c9029c237ac@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79a3de7c-21da-12ce-8372-9c9029c237ac@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240802_044507_865896_EC2DF336 X-CRM114-Status: GOOD ( 16.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jul 31, 2024 at 10:07:53AM +0800, Jinjie Ruan wrote: > On 2024/6/20 17:00, Jinjie Ruan wrote: > > Enable support for PREEMPT_DYNAMIC on arm32, allowing the preemption model > > to be chosen at boot time. > > > > Similar to arm64, arm32 does not yet use the generic entry code, we must > > define our own `sk_dynamic_irqentry_exit_cond_resched`, which will be > > enabled/disabled by the common code in kernel/sched/core.c. > > > > And arm32 use generic preempt.h, so declare > > `sk_dynamic_irqentry_exit_cond_resched` if the arch do not use generic > > entry. Other architectures which use generic preempt.h but not use generic > > entry can benefit from it. > > > > Test ok with the below cmdline parameters on Qemu versatilepb board: > > `preempt=none` > > `preempt=voluntary` > > `preempt=full` > > > > Update preempt mode with debugfs interface on above Qemu board is also > > tested ok: > > # cd /sys/kernel/debug/sched > > # echo none > preempt > > # echo voluntary > preempt > > # echo full > preempt Do you have a use case for this feature? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!