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 C000DC433EF for ; Mon, 7 Feb 2022 11:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ERO8dP6L2YADZFzRmAq0o4gJtpceeI0NuskI7s1dJ7s=; b=d4xOXCsNBy7D21 juGfc/txHNlkyl7IZEmcCdbCPNQg3Rc10rrLDTfT6QEcRddeaH0U/GxhRZ90ksT+eJe4zw1MsxRZx 94VXwh1D/SqYqjNdIHwdzRZ+8aPt06y6UJT8nqQq7Y4h7jWxj44KeaeoxbgaXzaaNFJlP99sSkapf MZq77mAtjZvKJuzODhJlPQ6DwaE8bwpl9H7KpeR+Db5vFzF1PJPeY6YN2otCht1fWnPUKf5VIIs3i nhEqcx7CTwOy7nfy6KglTNdYhWQARgkhew56452f9G22f0nuCZ3YhgBT65HzD9tQLYKK3tXrHmxum AnCXyk0siIvhgb1x5bwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH2dw-00A3qu-FN; Mon, 07 Feb 2022 11:57:16 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH2ds-00A3ph-T3 for linux-arm-kernel@lists.infradead.org; Mon, 07 Feb 2022 11:57:14 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E1A1160F62; Mon, 7 Feb 2022 11:57:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBCA6C004E1; Mon, 7 Feb 2022 11:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644235031; bh=1gjzPxzY6TrtkD/E/QoBv0Pnu4h98uNL6Xtp/W2eAWY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=G2r0Qy0d1WxcFIB9DEbkeirAjqXCRmYv72myWdUQv+Sl6L6cOuQ96/CqWHBCl726P 5N+5dA+Kj7lVCVQW5eK3Q3zSRj3watMYybj4UAVv7bDfOuDjZKCoP9ltw1jBElZCSl CqABD0U62RXhE6JrkJIkZzSj11k8yx00F+hdPy/RtMvg1MGqQJUIY9j6GlTTXs3RSj 4i5/Hwz7tKZGyXl3RBlr6VnGnnFCSm+muQDfmGLL5IZr1ZWFKMDZUFS8eTCYNAZ89q DOYGSx+BWlq24iahh5TJ0DR5HdE0sxdTJ/kopFIWHI6N4l4t0PXjQb8z06SDJC670U rfXPuGm5csCiQ== Date: Mon, 7 Feb 2022 12:57:08 +0100 From: Frederic Weisbecker To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, ardb@kernel.org, bp@alien8.de, catalin.marinas@arm.com, dave.hansen@linux.intel.com, james.morse@arm.com, joey.gouly@arm.com, juri.lelli@redhat.com, linux-kernel@vger.kernel.org, luto@kernel.org, mingo@redhat.com, peterz@infradead.org, tglx@linutronix.de, valentin.schneider@arm.com, will@kernel.org Subject: Re: [PATCH v2 5/7] sched/preempt: add PREEMPT_DYNAMIC using static keys Message-ID: <20220207115708.GA514319@lothringen> References: <20220204150557.434610-1-mark.rutland@arm.com> <20220204150557.434610-6-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220204150557.434610-6-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220207_035713_032622_A0E34330 X-CRM114-Status: GOOD ( 11.16 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Feb 04, 2022 at 03:05:55PM +0000, Mark Rutland wrote: > diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h > index dfd84c59b144..141952f4fee8 100644 > --- a/include/linux/entry-common.h > +++ b/include/linux/entry-common.h > @@ -456,13 +456,19 @@ irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs); > */ > void raw_irqentry_exit_cond_resched(void); > #ifdef CONFIG_PREEMPT_DYNAMIC > +#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) > #define irqentry_exit_cond_resched_dynamic_enabled raw_irqentry_exit_cond_resched > #define irqentry_exit_cond_resched_dynamic_disabled NULL > DECLARE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched); > #define irqentry_exit_cond_resched() static_call(irqentry_exit_cond_resched)() > -#else > -#define irqentry_exit_cond_resched() raw_irqentry_exit_cond_resched() > +#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) > +DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched); If CONFIG_PREEMPT && CONFIG_PREEMPT_DYNAMIC and no "preempt=" parameter is passed, nothing is overriden on boot. So you need to either have cond_resched and might_resched initially disabled (STATIC_KEY_FALSE?) or call sched_dynamic_update() from preempt_dynamic_init() also when CONFIG_PREEMPT=y. Thanks. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel