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 F2EF5C433EF for ; Thu, 17 Feb 2022 14:01:44 +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=LZCw+S8oBjb28/9XWkI9HR3BZtVtPxbAXl2nEgCQYLw=; b=HPuskopX8SsvfI rNBjy0/pNIqv3g5Z89NsKTVVtmJzVMqarQgaE41VU3SihNl2/CO0K7X1bvXPPWLfgky5ZG/rUmTh3 15FRctSo9juivPS/Km7iK/mCZ3uCTAfeQk5KWhN/EZmQFuHcrgI0uzI+Pzl/OK3/4SoxPS1Ncofgo MptK9AOtoIDKa3Kpg1rnmT55I2PGacfgC3me8BsrC0kIvHxBMjmUbjT6NMdOsRGev+oTaLISPxn/z J1chvdZag8SMFxoXDxrUABXEXOgvalBMGlUhifT6aiD7LScIQ+bG/oDwL5ZyZgUHGI7QmlYk+mSnw jdJUiWHOwPVlXt4Nh68w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKhK9-00Aoz9-G8; Thu, 17 Feb 2022 13:59:57 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKhCi-00Al21-JN for linux-arm-kernel@lists.infradead.org; Thu, 17 Feb 2022 13:52:19 +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 ams.source.kernel.org (Postfix) with ESMTPS id CE8B1B8212C; Thu, 17 Feb 2022 13:52:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 001A6C340EC; Thu, 17 Feb 2022 13:52:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645105934; bh=1FBELcGmNgV6WPqnzG9KqZxFGr79RBS+xeX0XZJnkjo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ACYy3WFkE3PdBBIvnhvya7apXL70pWr/FmXq6xHs5Mbn90yrrQshiL4/n6/d+eyXO KA+oAOmGfIAZZTA9+/dZZN/Y17zbtwuYggX9YM37Dj3yRre9No8JuDPSo48qNI2Mal bg+Ufy8Cjla9JPYzFgZ7OEvDMoc8AEuTr/lPAWlI5tMHu6eifavy7DoHpIm3of8VQ5 FlxH+mlTEcJ11WJ0Nekb70Zc6Iah3oPV651xkKYM8TEoo0L3koyc8iFSX05QICRP4k JcJ2VJwox2b4f2LRbcVke1fNHhPIp0/EAwZ+kmTMjpRG+AguUTEfWCqn0WfE69ma/3 xGdB6keScQ9gA== Date: Thu, 17 Feb 2022 14:52:11 +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 v4 0/7] arm64 / sched/preempt: support PREEMPT_DYNAMIC with static keys Message-ID: <20220217135211.GA745330@lothringen> References: <20220214165216.2231574-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220214165216.2231574-1-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220217_055216_845349_6A96238B X-CRM114-Status: GOOD ( 21.03 ) 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 Mon, Feb 14, 2022 at 04:52:09PM +0000, Mark Rutland wrote: > This series enables PREEMPT_DYNAMIC on arm64. To do so, it adds a new > mechanism allowing the preemption functions to be enabled/disabled using > static keys rather than static calls, with architectures selecting > whether they use static calls or static keys. > > With non-inline static calls, each function call results in a call to > the (out-of-line) trampoline which either tail-calls its associated > callee or performs an early return. > > The key idea is that where we're only enabling/disabling a single > callee, we can inline this trampoline into the start of the callee, > using a static key to decide whether to return early, and leaving the > remaining codegen to the compiler. The overhead should be similar to > (and likely lower than) using a static call trampoline. Since most > codegen is up to the compiler, we sidestep a number of implementation > pain-points (e.g. things like CFI should "just work" as well as they do > for any other functions). > > The bulk of the diffstat for kernel/sched/core.c is shuffling the > PREEMPT_DYNAMIC code later in the file, and the actual additions are > fairly trivial. > > I've given this very light build+boot testing so far. Acked-by: Frederic Weisbecker Thanks! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel