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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 020D9E7717D for ; Wed, 11 Dec 2024 13:26:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B0416B0284; Wed, 11 Dec 2024 08:26:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 55E2E6B0285; Wed, 11 Dec 2024 08:26:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3FEB56B0286; Wed, 11 Dec 2024 08:26:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 210A56B0284 for ; Wed, 11 Dec 2024 08:26:14 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 9F6C3140B89 for ; Wed, 11 Dec 2024 13:26:13 +0000 (UTC) X-FDA: 82882751364.11.76F1006 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf20.hostedemail.com (Postfix) with ESMTP id 620B91C001B for ; Wed, 11 Dec 2024 13:25:47 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=g3QuKsaQ; dkim=pass header.d=linutronix.de header.s=2020e header.b=oZyZKAzo; spf=pass (imf20.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733923556; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2cC0jtNFF2OB7EPEgIvbsGCXy7/YyEZDKndIQ+GkiRE=; b=5S/aJIOBE2Li3sW+GrjI74EqT4Kl3ghADgWE+VdbtWcv8vWnbAgBasPByatZFBiz/cyQLL gvlXkGF9dIzdU8aA7FqVdBdUQOLHpG4egu6Lwu/ekFeB46vZwHwgjT9OsBHVI2ueRqNzh0 fgwm5YSZRrIK2JHnhb0xu5d1IbXyS6k= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=g3QuKsaQ; dkim=pass header.d=linutronix.de header.s=2020e header.b=oZyZKAzo; spf=pass (imf20.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733923556; a=rsa-sha256; cv=none; b=NBUdGU5eiaaMKfpKQkR9Uw520H9ncEhD4hMke8ZvIhqxgpnFT/nraOjTG/11vY4drk5Sb0 b9DS6d0Xs30F0rayCO+AzwIna91+0q2jgQ40ZTiGu7+y/rY/ywGemZtaWb7enewTZ4kcnD Q5KWos+9Yp1nvqhj2shdOaAU2Cg5Ipw= Date: Wed, 11 Dec 2024 14:26:07 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1733923569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2cC0jtNFF2OB7EPEgIvbsGCXy7/YyEZDKndIQ+GkiRE=; b=g3QuKsaQef6e6PeMK+2oy3noWjaNhgRV6gXBjaotK0lO44SUXfa0MTZpNhHcq16gz+qlVh PN8w+U8BTzrMD0xY6Au9o2yGSnpKt9H2DtoVk4Dc+3Rf4bAtt2eWYbu5Xmjf/rJg6A+KKw DowFb+Ip/fqTB+MOql8BHL9HcrugxZeAXRzp4gnmPRaUtwONCu4O3MNVUzSmfFEPE6aOJ+ bVSiv4nmWM4r9C6KV3w1RMoMq/hazNgGNMiNlZxCpGixcaXJrKgY0Pe6JZ7wYH5aYnYqTc 4syQuoDYqxu9xGeFhtBThSDQgJA/mXzLVCjK7ybGuftIy28Wb7EmgjLiovNzSg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1733923569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2cC0jtNFF2OB7EPEgIvbsGCXy7/YyEZDKndIQ+GkiRE=; b=oZyZKAzopi3biPeXNdIzMu7nkbrftsiKhCO4QLn9NSke2ZXhslY9IaxLL2rMo1dfnCMIfX ScXi8cERdOFVpFBQ== From: Sebastian Andrzej Siewior To: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , linux-mm@kvack.org, linux-rt-devel@lists.linux.dev, Ard Biesheuvel , Clark Williams , Jason Baron , Josh Poimboeuf , Linus Walleij , Mark Rutland , Matthew Wilcox , Peter Zijlstra , Russell King , Steven Rostedt , Thomas Gleixner Subject: Re: [PATCH 1/4] ARM: Disable jump-label on PREEMPT_RT Message-ID: <20241211132607.z1zDTk89@linutronix.de> References: <20241210160556.2341497-1-arnd@kernel.org> <20241210160556.2341497-2-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20241210160556.2341497-2-arnd@kernel.org> X-Rspamd-Server: rspam05 X-Stat-Signature: x5yp994hn46pu9ygx7fx4a3naw7tnwn5 X-Rspamd-Queue-Id: 620B91C001B X-Rspam-User: X-HE-Tag: 1733923547-27730 X-HE-Meta: U2FsdGVkX1+jFTStMcp/cu81HL864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pmdl0Aiv8+B3rFCOX4c9Etiwm5EJMdCeMbGmO8E2Mt3BfGgEpYJG08wT8gw4gE2p9SEh3UPuH4bwEuS/enTT2dKQ2CnmdxxMXaLSONHCH04PncnAbP5AAstAojUPHq7c3vq3dvZcAekh/psXseLVJ+9JwDe4z9YObghvrv6aMisSEbhsS X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 2024-12-10 17:05:53 [+0100], Arnd Bergmann wrote: > 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. > > On 64-bit Arm, it is possible to use jump labels without the > stop_machine() call, which architecturally provides a way to atomically > change one 32-bit instruction word while keeping maintaining consistency, > but this is not generally the case on 32-bit, in particular in thumb2 > mode. > > Disable jump-label support on a PREEMPT_RT system when SMP is enabled. > > [bigeasy: Patch description.] > [arnd: add !SMP case, extend changelog] > > Signed-off-by: Thomas Gleixner > Signed-off-by: Sebastian Andrzej Siewior > Cc: Mark Rutland > Cc: Ard Biesheuvel > Link: https://lkml.kernel.org/r/20220613182447.112191-2-bigeasy@linutronix.de > Signed-off-by: Arnd Bergmann > --- > I slightly changed the patch from the version currently in linux-rt.git > to leave jump labels enabled on single-CPU kernels that are still > fairly common on 32-bit arm. So HOTPLUG_CPU depends on SMP and without SMP there no HOTPLUG_CPU so the patch function will be invoked directly. So we patch and flush. Well, okay. > If there are no additional concerns about this version, I will > forward it to Russell's patch system I'm fine with it, thank you. Sebastian