From patchwork Tue Mar 28 08:34:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 75902 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2059542vqo; Tue, 28 Mar 2023 01:37:33 -0700 (PDT) X-Google-Smtp-Source: AKy350brpsnQfu+IpbZ82Uco7YKM/Ww+PGarcyXeBz5qLGnaIu7u3NQY8Njk/144ci+FgDYYecFg X-Received: by 2002:a17:90b:4c86:b0:237:c565:7bc6 with SMTP id my6-20020a17090b4c8600b00237c5657bc6mr16735189pjb.10.1679992653007; Tue, 28 Mar 2023 01:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679992652; cv=none; d=google.com; s=arc-20160816; b=S9MorLSYtrzj3mosNl7RN+6kI28SJ1AsOdoyJtZjHqcL5dTZrabfRvSbqD8lRVR1M/ tjb0S00WthO+UFwWSqOto29EsQ8koN0Jna6SEWAtOHCI9OANyQ2WD5+6L9SY0uG5PaIN hiw62WoBDMJmxujAw5VAltRGfH0R4RuQl8DwWHjUSTHO/QBbjAX09eZhwbZw0Tt9bRWY RqvT1CScZfqkIJ5n5dD39T42zhcOOUcILMkwvIToOYPx2UVfqYJy6+RRNQ2TGUN1cGTK QZ60KrI8H4AONKW5hE97m4zgABWA/kfdcX+9CKAQnGgYAvAkAPfdEuebBT6x780rVbqs qn6w== 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.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: 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.37.20; Tue, 28 Mar 2023 01:37:32 -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.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 S232269AbjC1Ieu (ORCPT + 99 others); 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759721078569700407?= X-GMAIL-MSGID: =?utf-8?q?1761599976264136271?= 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