Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4045838rwl; Tue, 28 Mar 2023 01:36:20 -0700 (PDT) X-Google-Smtp-Source: AKy350ZXnNL9+43+iBeZ2l1lgNgHMESaEzOch/cFvrbYoTnSrHf18QeFRjE9jDS4hBlAA1NFmSpb X-Received: by 2002:a17:90b:3511:b0:22c:afd6:e597 with SMTP id ls17-20020a17090b351100b0022cafd6e597mr15230778pjb.17.1679992580023; Tue, 28 Mar 2023 01:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679992580; cv=none; d=google.com; s=arc-20160816; b=Vibh/t8VcwHkIB8PluUjMQ0jFbzie2xMC0ZSluPm6htWEEJKB+rdT6P5jq5Ztv2YRQ uAt0gz/oZB0a0c6+ScnWURgCbkeW/U7fIfy+7pEcQm2AbDFLreVtzxzLWg9ucq/DCFaC c1oWwLs8Icicra6xpwLwoq2hkYacqxj5+tILOseUYLX99OaxNxgA4kBVlJm9IqjNzNW/ mOYeiE2uMSv4rLRLaW112a1nFPLeUcoDHhgmqP0bExVnmzXFW7iMVdHqtmXO9md36ETQ 0S+JsdiBT+ixOLVv5Kg+tLsviBFKfPW3gr6BPpEHV0gY7ec94MOGdYgzao+4dUy41Dia sMoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=JwnODAabhQth5uPvugI0OVmAVkGREG74VHgJRy0IVJk=; b=O5NNxGoAPaDI4tGlksDZ2GQowVnIu3pyWsqpBqman0E1AB+xRy/hWHUmB0o5Q8HXy6 9xSAHwP161kBrDHewA7Mlu0Tu9iguxc2VxyOWwFMoL4E2q0FmKFjVXmop+ga0c4fB9mk ygrsDZSTUG9+ovQncYeCey5wCmIbVXzTI4O8ZvymfbGR3nsJxFeXGzWuskZHIfU2xqMS AZyzyDJyUm8QLZQrvaOyFDOJqs26zZeRsNeUuInhEDM52yGBF6qytpst3NJrc83bCpFG f+Rs6694QJB3/kOmeYnaXd4R5ssip4nGHYfPDz+N7MURTTO0vUDviLtZFIxP95vyjIG+ YCtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="OOdP35I/"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="/IcDuLfF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id om13-20020a17090b3a8d00b0023cfd08e30esi13153464pjb.148.2023.03.28.01.36.08; Tue, 28 Mar 2023 01:36:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="OOdP35I/"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="/IcDuLfF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232256AbjC1Iet (ORCPT + 99 others); Tue, 28 Mar 2023 04:34:49 -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: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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/253a0fb4c62827cdcaf43afcea5d675507eaf7a3 Author: Valentin Schneider AuthorDate: Tue, 07 Mar 2023 14:35:57 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