From nobody Mon May 6 12:34:38 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B76EC76196 for ; Tue, 28 Mar 2023 08:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232278AbjC1Ieu (ORCPT ); Tue, 28 Mar 2023 04:34:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbjC1Ies (ORCPT ); Tue, 28 Mar 2023 04:34:48 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A2A0420A; Tue, 28 Mar 2023 01:34:47 -0700 (PDT) Date: Tue, 28 Mar 2023 08:34:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1679992485; h=from:from:sender:sender:reply-to: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JwnODAabhQth5uPvugI0OVmAVkGREG74VHgJRy0IVJk=; b=OOdP35I/3UcZDG6TUGzUxPHPbHwqQ19fkFhusHa3gjLbmHzF6SxN9NgqCL6+XxDnK+lqIa xHzr47pV1J0D4GEGWa7uXINGb0OIVuciXF40hR3V4i15LlAMtVCKmCwZerLxte7Dw43hiD JCYPJZicV3akjEXhYEbCJNvF2CxwpSWTsbjgMnNBPc4ER+EhCRbM3rjIODUujBYqBZckQb an6YaGjonGD0obc6xWgbSdJFmZtAJeo4vSFQ89/xUpqsMTlVVG8RehMk31iJFp23GQensj Thh3TPpVCLM4CWecvljGiF6lcPeLQPl6QZ3p2kL1eeYhlVOL0FmcQgpH0BV1LQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1679992485; h=from:from:sender:sender:reply-to: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JwnODAabhQth5uPvugI0OVmAVkGREG74VHgJRy0IVJk=; b=/IcDuLfFtcmOyg0aOFo84DfrAuTROQ2Z0lLprU4egfclBPSyNOFPRsuR4Kl92GceVu48qy LYJNkPbp8XD1xaDA== From: "tip-bot2 for Valentin Schneider" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: smp/core] smp: reword smp call IPI comment Cc: Valentin Schneider , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230307143558.294354-7-vschneid@redhat.com> References: <20230307143558.294354-7-vschneid@redhat.com> MIME-Version: 1.0 Message-ID: <167999248523.5837.16636131269794439264.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the smp/core branch of tip: Commit-ID: 253a0fb4c62827cdcaf43afcea5d675507eaf7a3 Gitweb: https://git.kernel.org/tip/253a0fb4c62827cdcaf43afcea5d67550= 7eaf7a3 Author: Valentin Schneider AuthorDate: Tue, 07 Mar 2023 14:35:57=20 Committer: Peter Zijlstra CommitterDate: Fri, 24 Mar 2023 11:01:28 +01:00 smp: reword smp call IPI comment Accessing the call_single_queue hasn't involved a spinlock since 2014: 6897fc22ea01 ("kernel: use lockless list for smp_call_function_single") The llist operations (namely cmpxchg() and xchg()) provide similar ordering guarantees, update the comment to lessen confusion. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230307143558.294354-7-vschneid@redhat.com --- kernel/smp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 03e6d57..6bbfabb 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -312,9 +312,10 @@ static DEFINE_PER_CPU_SHARED_ALIGNED(call_single_data_= t, csd_data); void __smp_call_single_queue(int cpu, struct llist_node *node) { /* - * The list addition should be visible before sending the IPI - * handler locks the list to pull the entry off it because of - * normal cache coherency rules implied by spinlocks. + * The list addition should be visible to the target CPU when it pops + * the head of the list to pull the entry off it in the IPI handler + * because of normal cache coherency rules implied by the underlying + * llist ops. * * If IPIs can go out of order to the cache coherency protocol * in an architecture, sufficient synchronisation should be added