Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2310449rwb; Fri, 2 Dec 2022 08:07:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf5/7fV9y4t14aurGqTC59WMlWWnXgspW46w1JW7yPEwz0o30vbXlLoLoeoAhqE2UxE/jhgb X-Received: by 2002:a17:90a:65c1:b0:218:c9e2:d988 with SMTP id i1-20020a17090a65c100b00218c9e2d988mr53324143pjs.94.1669997271122; Fri, 02 Dec 2022 08:07:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669997271; cv=none; d=google.com; s=arc-20160816; b=WKrt/FZjL2w/3tMI9HSZt5I4Ij1qjyIMv7CVwY48Mb04PeAJqQMoGvknyk+OQAE3cI /B4w+VKx5hP6nGuOdMI+drEa8d9QSp19EPUVlK59C8baIGqnPR0ANK2q+oPX3YcymHDf 4cBh1b3AFSzWlSEVN2OYcz1mFKBVECVj+ennngvfo6IOdF9MjafWQZ04ISAPwMVD13+u KDZfFsSnbIY6sz+lwLNU80UvicFMRolCTIRS2OIiMRXatnmHUFlgc7UvaxHEvX4iIFoi FbzUSuKvBsuusVSEFO8kksCHW3eTpixeIyoNtnCT+XaLTcqvQX8A2C4kZTglKWibtvvY 9sNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QbSxuBYwyBhZhp7hgOeOy88U7e5YyI7vjVO9jj/5+zE=; b=fkgCYa0JxoKzBS/IuKTVzKAE6ahQ2Ce5TfH5qwYNXbS4dqceRP+P2d2RWepWuN9Yzn mobStAkrJ0iXqTFhC8SXFvxVmfjlBtOunmn7oHVLuGVSQJfUZ4gi1syypa/s9JD+x0l8 twQ2dPvfVachkeh6A5lvO+fs9RhqxPOyhRWPsEtW8TrdkejVCC+M+i5W2gBoTOup9Osg MS1ggqaFaRUYemJUIyemDzhivfl48hdQ2S2ijuUaUBKcyagwUEUtTjU9+I4YoV6qPkpf ml6xjOM7fhUbIzZM/XfxqSDqu/LtzhGt/KSAamGpLBgPvaVgYg6LBrawVHrDQYpsO2AY i0nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g1+hmoe+; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r76-20020a632b4f000000b0046ff400d209si7928264pgr.724.2022.12.02.08.07.33; Fri, 02 Dec 2022 08:07:51 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=g1+hmoe+; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233896AbiLBQBv (ORCPT + 83 others); Fri, 2 Dec 2022 11:01:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233850AbiLBQAw (ORCPT ); Fri, 2 Dec 2022 11:00:52 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 424C2DF63C for ; Fri, 2 Dec 2022 07:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669996771; 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=QbSxuBYwyBhZhp7hgOeOy88U7e5YyI7vjVO9jj/5+zE=; b=g1+hmoe+IQ5Q25/+4K3+hynisY5BWNqHkSMiOAqrBkTKMuIl0/5cDxZxVx5/BrXdYm7okt RiJZi1L4JaSuwtl2qKGD5h8+n7yDVsKtnaoviNFiRW5nXqOTdIm5IPgu9SuEm+o8XeGEbn BNvPqQZzn1zhVKSA7cDOXoxgb/jTqCk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-643-PZIbC1qRM0uYzAeFKyhbPQ-1; Fri, 02 Dec 2022 10:59:28 -0500 X-MC-Unique: PZIbC1qRM0uYzAeFKyhbPQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 62F0E833A06; Fri, 2 Dec 2022 15:59:26 +0000 (UTC) Received: from vschneid.remote.csb (unknown [10.33.36.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 712A220290A5; Fri, 2 Dec 2022 15:59:22 +0000 (UTC) From: Valentin Schneider To: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, x86@kernel.org Cc: "Paul E. McKenney" , Steven Rostedt , Peter Zijlstra , Thomas Gleixner , Sebastian Andrzej Siewior , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Frederic Weisbecker , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Marc Zyngier , Mark Rutland , Russell King , Nicholas Piggin , Guo Ren , "David S. Miller" Subject: [PATCH v3 7/8] smp: reword smp call IPI comment Date: Fri, 2 Dec 2022 15:58:16 +0000 Message-Id: <20221202155817.2102944-8-vschneid@redhat.com> In-Reply-To: <20221202155817.2102944-1-vschneid@redhat.com> References: <20221202155817.2102944-1-vschneid@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 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 --- kernel/smp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 93b4386cd3096..821b5986721ac 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -495,9 +495,10 @@ void __smp_call_single_queue(int cpu, struct llist_node *node) #endif /* - * 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 -- 2.31.1