From patchwork Mon Jun 13 18:24:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12879884 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 94012C433EF for ; Mon, 13 Jun 2022 18:26: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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UebVyg0TMiu6gZ4PXFckXWMH3DeB29r8aiedRf+izaU=; b=J3krC9c0tMDQx6 /kuO3Tj92T1q+o1lNQh6TVmKctRxw8a/tKBPGLFPa2owPF6pCjM2h8fbYkvgLR2zA7M7IT24iwGEn b1gPd4Fixc5ROpWwsmo5I7BTNLpFpfEcKy5hFcBHE56efKvs2hB6K1C3b4G7+YsuWWepTta/cYd6a PEpGjcIAyu0zfTxHEw/E+NLp3KpjbOjyw680G7RxvLcQkBI6BCA/rulaZCp561xYhvw3TjPck8AN0 GGvV/u4Dy7/j86jc8WUiU5DtC/NfotS+hkdfN9fHOuW4knmZVhIdh+YKPvWz8cznkv2svBbNFN17X 1AXXo1mYJzkt7vgJdQMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0okZ-0059Yf-M7; Mon, 13 Jun 2022 18:25:19 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0okF-0059RW-Ff for linux-arm-kernel@lists.infradead.org; Mon, 13 Jun 2022 18:25:01 +0000 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1655144693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dbivo31boorExIfiEyWN7RONQm+9Q9+SCeN69csIayY=; b=42ZSg1ksBNk3yj7iwxP9Zc6FSefCcrQn4Umu3Zg42CVcToZn3Yd8mp4SPM+PupQxdEVs8+ tStgmX00WCsKJOepHEjARgrE9f7qvG/ViMJ5XTInWvuSVdPEEXm+EA4IwuXA80JmGs/DcB b+xvroKamgLo2x6O18m1VDgglIvXE06friZ2fkru3mfHm4WVswRk/+xnWfCDkg57D/pih4 JuhbqEQPq39AVj3eatct2qtSdxx3p+pI5SJVu1TVgnFCQayXRC7T/g+uuEIBXjT+1exN17 mxRt6QigK0Z/7TmfL8bL64yGBk7QVtIK5yhFlASCMD2Wcv27LNJiuFd59F7Dwg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1655144693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dbivo31boorExIfiEyWN7RONQm+9Q9+SCeN69csIayY=; b=K6KwCCLZkLuRAPxNtz9vswmaVkeBGeafBo8uJnvsWzDQzBEL+KqibtxnTqrDEJt7XFlYTc L7k/fAs8108S10CQ== To: linux-arm-kernel@lists.infradead.org Cc: Russell King , Arnd Bergmann , Thomas Gleixner , Sebastian Andrzej Siewior Subject: [PATCH 1/2] arm: Disable jump-label on PREEMPT_RT. Date: Mon, 13 Jun 2022 20:24:46 +0200 Message-Id: <20220613182447.112191-2-bigeasy@linutronix.de> In-Reply-To: <20220613182447.112191-1-bigeasy@linutronix.de> References: <20220613182447.112191-1-bigeasy@linutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220613_112459_745587_39AFE6E3 X-CRM114-Status: GOOD ( 13.14 ) 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 From: Thomas Gleixner jump-labels are used to efficiently switch between two possible code paths. To achieve this, stop_machine() is used to keep the CPU in a known state while the opcode is modified. The usage of stop_machine() here leads to large latency spikes which can be observed on PREEMPT_RT. Jump labels may change the target during runtime and are not restricted to debug or "configuration/ setup" part of a PREEMPT_RT system where high latencies could be defined as acceptable. Disable jump-label support on a PREEMPT_RT system. [bigeasy: Patch description.] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7630ba9cb6ccc..2088d9322588e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -71,7 +71,7 @@ config ARM select HARDIRQS_SW_RESEND select HAVE_ARCH_AUDITSYSCALL if AEABI && !OABI_COMPAT select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6 - select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU + select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU && !PREEMPT_RT select HAVE_ARCH_KFENCE if MMU && !XIP_KERNEL select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL