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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D99ECDB474 for ; Fri, 20 Oct 2023 10:48:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377088AbjJTKsh (ORCPT ); Fri, 20 Oct 2023 06:48:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377048AbjJTKsc (ORCPT ); Fri, 20 Oct 2023 06:48:32 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EA59D6E for ; Fri, 20 Oct 2023 03:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NOMxNjx/SxB8UpPHiNmBQL1h4GVdvBvOWMoxgfnZlss=; b=BEHCascZlP8ujBRyAuz7WErWKe gU4S9pTQFjOfzHOc97vbGEB9ta6UuyZVEedijgX/axDNbYJTl36SbbKZDREClX5mZRkxf6+dxQgKh hARm4vPxmUfInzN5sVCcGWs166AVnEv+4WWdTrsTUCH4fFny5zqAhFNjkPV9cvYI46qzeTSz1Qwan 7/jfUfeixISde6Gckxx5RoSr2XdBE9KIsllfT9CP3TJK56vOuKeMiAFl/VpWpGs8fAt9BJ2uUfWt1 ZSuY1QuaMY5I/nKIC4Jr105/zTvfiVphzgYjV9b38OotCv0uVD+gO/8/uhT9XdutrTPjoOgepz3v5 QObTjvPQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qtn2w-00Axcb-2T; Fri, 20 Oct 2023 10:48:02 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 7028A300392; Fri, 20 Oct 2023 12:48:02 +0200 (CEST) Date: Fri, 20 Oct 2023 12:48:02 +0200 From: Peter Zijlstra To: Mark Rutland Cc: Rong Tao , elver@google.com, linux-kernel@vger.kernel.org, rongtao@cestc.cn, tglx@linutronix.de Subject: Re: [PATCH v2] stop_machine: Avoid potential non-atomic read of multi_stop_data::state Message-ID: <20231020104802.GB33965@noisy.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 20, 2023 at 11:23:37AM +0100, Mark Rutland wrote: > > And replace smp_wmb()+WRITE_ONCE() with smp_store_release(). > > This is also fine, but feels like a logically separate change. Agreed, and please take this opportunity to write a comment with the barrier.